Black Friday Black FridayUp to 85% off all WP Ghost plans.48 months from $49, or pay once for lifetime. SHOP NOW

How Do I Rename the wp-content Folder in WordPress?

Moved

This tutorial has moved to the new WP Ghost Knowledge Base where each feature is presented in detail.

View on new site

Change the wp-content path in WP Ghost (Change Paths > WP Core Security) and the folder itself stays where it is: WP Ghost serves it under the new name with rewrite rules, without editing wp-config.php. You can also rename the folder over FTP, but that needs config changes, can break plugins and hides nothing else.

How do I change the wp-content path with WP Ghost? (Recommended)

WP Ghost changes the wp-content path at the URL level without touching the actual folder. This is the recommended approach because it’s instant, fully reversible, and includes additional security (hiding the old path, blocking file extensions, and protecting sub-paths).

Go to WP Ghost > Change Paths > Level of Security and choose Safe Mode or Ghost Mode. Then go to WP Ghost > Change Paths > WP Core Security and enter a name in the Custom wp-content Path field (the mode fills in a default you can change). Click Save.

After saving, every URL that previously showed /wp-content/ in your page source now uses your custom path. CSS files, JavaScript files, image URLs, font paths, and all assets update automatically. The actual /wp-content/ folder stays exactly where WordPress put it. WP Ghost creates the virtual path through server rewrite rules.

For extra protection, enable Hide WordPress Common Paths in the same section. This blocks direct access to the old /wp-content/ path, returning a 404 for anyone (or any bot) that tries to access it.

For the complete step-by-step guide, see the change wp-content path tutorial.

Can I rename the wp-content folder manually?

Yes, but it’s more complex and riskier. The manual method involves physically renaming the folder via FTP or File Manager, then adding a constant to wp-config.php to tell WordPress where to find it. You need to add define('WP_CONTENT_DIR', '/path/to/new-folder'); and define('WP_CONTENT_URL', 'https://yourdomain.com/new-folder'); before the “stop editing” line.

The drawbacks of the manual approach: it only changes the folder name (it doesn’t hide the old path or block access to it), it requires editing a critical config file (a typo can break your site), some plugins hardcode /wp-content/ and may break, it doesn’t change sub-paths like /plugins/ or /themes/, and it doesn’t provide any firewall, brute force, or other security features.

WP Ghost handles all of this automatically, changes all sub-paths too, and adds layered security on top. If you deactivate WP Ghost, everything reverts instantly. With the manual method, reverting requires editing config files again.

Why should I change the wp-content path at all?

The /wp-content/ folder is the most revealing path on a WordPress site. It holds your themes, plugins and uploads, and every CSS, JavaScript and image URL in your page source points to it. Vulnerability scanners use it to list your plugins and themes by name, and theme detectors read it to identify your CMS. Changing this one path removes the biggest WordPress fingerprint from your site and breaks the most common bot reconnaissance.

For complete protection, also change the plugins path, themes path, and uploads path within wp-content.

Frequently asked questions

Does WP Ghost physically move or rename the wp-content folder?

No. WP Ghost never moves, renames, or modifies any file or folder. The wp-content directory stays exactly where WordPress installed it. WP Ghost creates virtual paths through URL rewrite rules. Deactivating restores all original paths instantly.

What name should I use for the custom path?

Avoid names that hint at content, like “content”, “assets”, “files” or “resources”. Pick something that doesn’t suggest what’s inside, and replace the default name the mode fills in.

Will this break my plugins or theme?

No. WP Ghost’s rewrite rules transparently serve files from the original /wp-content/ directory through the new URL. WordPress, your theme, and your plugins don’t know the difference. Everything loads at the same speed with the same functionality. The only change is the URL path visible in the page source.

Does this work with WooCommerce?

Yes. WooCommerce product images, stylesheets, and scripts all load from /wp-content/. When you change the path, WooCommerce assets use the new URL automatically. Cart, checkout, product pages, and all store functionality work normally.

Does WP Ghost modify WordPress core files?

No. WP Ghost uses server rewrite rules (.htaccess on Apache/LiteSpeed, hidemywp.conf for Nginx) and WordPress filters. No core files, no wp-config.php, no theme files, and no plugin files are modified. Deactivating restores all defaults instantly.