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.
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
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' );
wp-config.php
did you add yourdefine()
line? It needs to go before the/* That's all, stop editing! Happy bloggin.! */
line. See wordpress.stackexchange.com/questions/103945/… .