0

I want to move wp-content folder out of wordpress installation folder. I have set

define('WP_CONTENT_DIR', '/opt/deployer/wordpress/wp-content' ); in wp-config.php file. But themes stopped working on site.

Please help me.

1

The answer depends on why are you moving the folder.

If you just need to folder to be moved but leave the URLs the same then you will need to adjust yout apache/nginx config files to point to the right directory when serving a request for a url of the type /wp-content/...

If you need to adjust the url as well then you need to also define appropriate WP_CONTENT_URL

  • I can set the WP_CONTENT_URL but I am not sure how to do that. WP_CONTENT folder is not inside wordpress installation,it somewhere else in filesystem. – abhi shukla Oct 29 '15 at 13:33
  • If the directory is not accessable from outside by a url then you need to change your webserver config. – Mark Kaplun Oct 29 '15 at 13:50
  • Can you please share what changes I need to make in NGINX configuration..? – abhi shukla Nov 10 '15 at 16:20
0

Create a folder as blog.

put wp-contant folder in blog folder.

define this line in config.php

/* That's all, stop editing! Happy bloggin.! */

define( 'WP_CONTENT_DIR', dirname(FILE) . '/blog/wp-content' );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.