• Resolved k83uhse6v

    (@k83uhse6v)


    Hi,

    when I update the permalink structure from CLI, the Cache Enabler still says:

    Cache Enabler requires a custom permalink structure. Please enable a custom structure in the Permalink Settings.

    • This topic was modified 5 years, 4 months ago by k83uhse6v.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Anonymous User 16850768

    (@anonymized-16850768)

    Are your pages being cached? Does this still occur after a hard refresh of your page? Updating the permalink structure from the command line should trigger the permalink_structure_changed hook, which then triggers Cache Enabler updates to occur.

    If your pages aren’t being cached and/or the warning is still shown afterward, can you please provide the exact command ran so I can replicate this issue to troubleshoot it further?

    Thread Starter k83uhse6v

    (@k83uhse6v)

    Pages are not cached. Yes, this still occur after a hard refresh of page.

    I used this command, because I use Plesk:

    plesk ext wp-toolkit –wp-cli -instance-id 1 — rewrite structure ‘/%postname%/’

    The permalink structure has been changed correctly, but the plugin keeps showing the notification.

    But you can try with the standard WP CLI command:

    wp rewrite structure ‘/%postname%/’

    https://developer.ww.wp.xz.cn/cli/commands/rewrite/structure/

    Manual change from the WP admin panel of course solves the problem.

    Anonymous User 16850768

    (@anonymized-16850768)

    I’m unable to replicate this issue. When in the Permalink Settings, if the permalink structure is set to Plain and the wp rewrite structure '/%postname%/' command is ran it triggers the permalink_structure_changed hook to be fired, which triggers the Cache_Enabler::update_backend() method to be called.

    Once the backend is updated the settings file is also updated. Please note that the permalink_structure_changed hook is only fired if the permalink structure has actually changed in the database. If the database didn’t require an update, like if the permalink structure wasn’t actually changed, then it won’t be fired.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Upade permalink structure from wp cli’ is closed to new replies.