How Do I Rename the wp-content Folder in WordPress?
This tutorial has moved to the new WP Ghost Knowledge Base where each feature is presented in detail.
You can change the wp-content path using WP Ghost without physically renaming any folder. WP Ghost creates a virtual path through URL rewrite rules, which is safer, reversible, and doesn’t require editing wp-config.php. Alternatively, you can rename the folder manually via FTP, but the manual method requires code changes, risks breaking your site, and doesn’t include the security benefits WP Ghost provides.
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 select Safe Mode or Ghost Mode. Then go to WP Ghost > Change Paths > WP Core Security. Enter a custom name in the Custom wp-content Path field (a random name is pre-filled). 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/ directory is the most revealing path on any WordPress site. It contains your themes, plugins, and uploads. Every CSS file, JavaScript file, and image URL in your page source references this path. Vulnerability scanners like WPScan use it to enumerate your plugins and themes by name. Theme detectors read it to identify your CMS. Changing this single path removes the biggest WordPress fingerprint from your site and breaks the most common bot reconnaissance patterns.
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 obviously relate to content, like “content”, “assets”, “files”, or “resources”. Choose something random that doesn’t hint at what’s inside. WP Ghost pre-fills a random name when you first access the setting.
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.