• Resolved Tony Starks

    (@eeriksalke)


    Hello, I changed my wp-content folder to a new name at the recommendation of iTheme Security some time ago. Now I’m working with some themes and plugins which break due to this change so I’d like to change the folder back to its original name ‘wp-content’. How can I do this?

    I noticed that this is not possible through the plugin itself (which is a real shame)! I also noticed that simply changing the folder manually back to wp-content, and updating the files define( ‘WP_CONTENT_URL’) and define( ‘WP_CONTENT_DIR’) parameters in the wp-config file also doesn’t do it.

    So I’d love some help on what else do I need to do?

    https://wordpress.org/plugins/better-wp-security/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Tony Starks

    (@eeriksalke)

    Ah, all fixed…

    I’ve been playing with this option last week.

    First of all I was also surprised to find that once this option is set it completely disappears from the Advanced page …

    So I wondered ,just as you, how do I undo this ?

    Turns out this option does 3 things:

    1. Adds the WP_CONTENT_URL and WP_CONTENT_DIR constants to the wp-config.php
    2. Renames the wp-content directory to the new directory name.
    3. Resets the Backup\Log\nginx locations.

    So knowing that I started experimenting.
    Removed the 2 defined constants in wp-config.php
    Manually renamed the new wp-content dir to wp-content.
    Did no actions yet for the Backup\Log\nginx locations.
    (There seems to be reset code that will take care of this automatically).

    So then I accessed the WP login slug and got the WP login screen.
    I logged in and everything seems to be fine.
    First time you save any iTSec changes you not only get the confirmation (Settings saved) but it will also signal the Backup and log locations being reset as they seem to be invalid.

    That’s it.

    Oh and the option to rename the wp-content folder is back in the iTSec Advanced page.

    dwinden

    Very helpful. Thanks for posting what you found.

    AxelKCda

    (@axelkcda)

    Interested if this is the approach Tony used.

    Tony?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How do I change the name of 'wp-content' folder back?’ is closed to new replies.