You have two options to rename the wp-content folder in WordPress: a manual rename via FTP or File Manager (physically renaming the folder and updating wp-config.php), or the WP Ghost plugin method, which creates a virtual path without moving or renaming any files. The WP Ghost approach is safer because nothing is physically altered on your server — the original wp-content directory stays where WordPress expects it, and deactivating the plugin restores the original path instantly. Configure it at WP Ghost > Change Paths > WP Core Security by setting a custom name in the Custom wp-content Path field, then enable Hide WordPress Common Paths to block access to the original path.

Manual Rename vs WP Ghost: What’s the Difference

Both approaches achieve the same visible result — your page source shows a custom path instead of /wp-content/. The difference is what happens on your server and how reversible the change is.

AspectManual Rename (FTP)WP Ghost Plugin
Physical file changesYes, folder is actually renamed on serverNo, files stay in original location
wp-config.php edit requiredYes, must define new content path constantNo
Risk of breaking the siteHigher, typo in path constant locks you outLower, settings can be reverted from admin
Re-login required after changeYesNot necessarily
ReversibilityManual, rename folder back + revert wp-configDeactivate the plugin, instant revert
Blocks access to old pathNo automatic blockYes, with Hide WordPress Common Paths enabled
Technical skill neededPHP/server familiarity requiredNone

For most users, the WP Ghost method is the safer and more complete option.

Option 1: Manual Rename via File Manager or FTP

You can physically rename the wp-content folder to lib (or any other name) using the File Manager in your hosting panel or an FTP client. After the rename, you need to re-login to your website. This is the approach documented in the original WordPress codex, it works but requires care with file permissions and any code that references the old path.

Note: some plugins, themes, and caching tools reference the default wp-content path directly. After a manual rename, those references can break until each plugin or theme is updated to match the new path. You’re responsible for testing and troubleshooting those compatibility issues yourself.

Option 2: Use WP Ghost (Recommended)

WP Ghost changes the wp-content path without moving, renaming, or modifying any files on your server. The actual folder stays exactly where WordPress expects it, WP Ghost uses URL rewrite rules to create the virtual path your visitors and scanners see.

  1. Go to WP Ghost > Change Paths > Level of Security. Select Safe Mode or Ghost Mode. Click Save.
  2. Go to WP Ghost > Change Paths > WP Core Security.
  3. In the Custom wp-content Path field, a predefined name is already filled in. Enter a different name or keep the predefined one. Avoid names that obviously relate to content, like content, assets, files, or resources. Choose something random that doesn’t suggest what’s inside.
  4. Switch on Hide WordPress Common Paths to block access to the old wp-content path and all sub-paths. Anyone trying to access the old path gets a 404.
  5. Under Hide File Extensions, select which file types to block from the old sub-paths (PHP, JS, TXT are the key ones).
  6. Click Save to apply.
  7. Run a Security Check at WP Ghost > Security Check to verify the change is working.

Full walkthrough in the Change wp-content Path with WP Ghost guide.

What Happens After You Save

Every URL that referenced /wp-content/ now uses your custom path. If you view your page source, images, CSS, JS, and font URLs all update to the new path. Where you used to see /wp-content/themes/your-theme/style.css, you’ll now see something like /your-custom-name/themes/your-theme/style.css.

Vulnerability scanners that enumerate plugins and themes by probing /wp-content/plugins/ or /wp-content/themes/ can’t find those directories at the default path, they hit 404s instead.

To verify manually: open a private browser window, view the page source, and search for wp-content. If the path change is working, there should be no instances.

Frequently Asked Questions

How do I rename the wp-content folder?

You can either physically rename the folder via FTP or File Manager (requires a matching wp-config.php edit and re-login), or use WP Ghost to change the path virtually without moving any files. With WP Ghost, go to WP Ghost > Change Paths > WP Core Security, set a custom name in the Custom wp-content Path field, enable Hide WordPress Common Paths, and save.

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

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

Will this affect my SEO?

No. Search engines don’t index or rank based on your asset folder structure. Your posts, pages, sitemaps, and canonical URLs remain exactly the same. Image URLs in your content use the new path, but since the images still load correctly, there’s no SEO impact.

Should I also change the plugins and themes paths?

Yes, for complete path security. Plugins and themes both live inside /wp-content/. Changing the wp-content path alone hides the parent directory, but the /plugins/ and /themes/ subdirectories are still visible inside your new custom path. For complete security, also change the plugins path and themes path to hide those directory names too.

What name should I choose for the custom path?

Avoid names that obviously relate to content, like content, assets, files, or resources. Choose something random that doesn’t suggest what’s inside. WP Ghost fills in a predefined random name by default, which you can use as-is.

Do I need to clear my cache after changing the wp-content path?

Yes. If you use a caching plugin, clear your cache after making the change. Cached pages may still contain the old /wp-content/ references until the cache is refreshed. If your caching plugin minifies or combines CSS and JS, also enable Change Paths in Cached Files so the new paths appear inside minified files.

Does WP Ghost modify WordPress core files?

No. WP Ghost uses URL rewrite rules and WordPress filters. No files are moved, renamed, or modified. Deactivating the plugin restores all original paths instantly.