admin管理员组文章数量:1291718
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.
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.
Share Improve this question asked Oct 28, 2015 at 15:58 abhi shuklaabhi shukla 1011 bronze badge 1 |2 Answers
Reset to default 2The 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' );
本文标签: customizationMoving wpcontent folder
版权声明:本文标题:customization - Moving wp-content folder 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741537186a2384095.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
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/questions/103945/… . – Pat J Commented Oct 28, 2015 at 16:17