wp-content holds themes, plugins, and uploads. WordPress expects that layout by default. You can point core at a different path with constants in wp-config.php. That is a maintenance decision, not a meaningful defense against modern automated attacks.
Renaming the folder so bots “cannot find” plugins is mostly security theater. Attackers hit known plugin URLs, XML-RPC, and login forms. They do not need a friendly folder name. Plenty of plugins and must-use tooling also assume /wp-content/.
If you need real hardening, start with the hardening guide and login security.
Correct constants (there is no WP_CONTENT_FOLDERNAME)
WordPress documents two related defines:
WP_CONTENT_DIR: absolute filesystem path to the content directory
WP_CONTENT_URL: full URL to that directory (no trailing slash)
There is no supported WP_CONTENT_FOLDERNAME constant. Older tutorials that invent it are wrong and will not rename the folder for you.
Place custom defines in wp-config.php above the line that says /* That's all, stop editing! */.
Example: content directory in a custom path
define( 'WP_CONTENT_DIR', '/var/www/example.com/site-content' );
define( 'WP_CONTENT_URL', 'https://example.com/site-content' );
Then:
- Back up the site (files + database).
- Move the existing
wp-content directory to that path (or copy, verify, then remove the old one).
- Confirm
WP_CONTENT_DIR matches the real server path and WP_CONTENT_URL matches the public URL.
- Load the front end and wp-admin. Check that media, themes, and plugins still resolve.
Do not leave a trailing slash on either value.
“Rename only” in the same parent directory
If the folder stays next to wp-admin and you only change the directory name, you still set both path and URL to the new name:
define( 'WP_CONTENT_DIR', dirname( __FILE__ ) . '/app-content' );
define( 'WP_CONTENT_URL', 'https://example.com/app-content' );
Rename/move the folder on disk to match. Test thoroughly.
Rollback if something breaks
Symptoms: white screen, missing CSS, 404 on /wp-content/uploads/, plugins “not found.”
- Via SFTP or host file manager, revert
wp-config.php to the backup copy (remove custom defines)
- Move the content folder back to the default
wp-content path next to wp-admin
- Confirm file ownership matches what the web user expects
- Clear any page cache and CDN cache
- Load wp-admin → Settings → Permalinks → Save (flushes rewrite rules)
If you cannot access wp-admin, fix paths first. Do not edit core files.
When a custom content path is reasonable
- Hosting layout requirements (rare)
- Separating uploads onto another volume (often better solved with
UPLOADS or object storage plugins)
- Advanced multi-app deployments where you already own the breakage risk
- Compliance layouts that mandate specific directory separation (with full regression testing)
When to skip it
- You want “more security” with one clever trick
- You use many third-party plugins and cannot regression-test them
- You are on managed WordPress hosting that forbids or resets custom paths
- You do not have a full backup and a rollback plan
- A client site where the next agency expects default paths
Protect wp-config instead of hiding folders
wp-config.php holds database credentials and salts. Keep it non-writable by the web user when your host allows that, outside the web root if the host supports it, and never committed to a public repo. Security Ninja’s scanner checks common wp-config permission mistakes.
More practical hardening beats folder renaming every time: updates, few admins, 2FA, backups, and a firewall.
Bottom line
Moving wp-content is an architecture choice, not a shortcut past plugin updates and login hardening. If you cannot explain the operational benefit, skip it and spend the time on the security checklist instead.