admin管理员组文章数量:1431977
I tried to add this to the end of my wp-config.php
define('WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/somedir');
define('WP_CONTENT_URL', '');
however, echo immediately after that shows the old values (with wp-content value). I tried echo because in wp admin I couldn't see the theme from new location, of course.
I have installed wp in example/wp subdirectory and site itself is example - I copied over .htaccess and index.php over to the root and everything is working fine, I just need to move wp-content into another folder over at root also with a different name.
I tried to add this to the end of my wp-config.php
define('WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/somedir');
define('WP_CONTENT_URL', 'http://example/somedir');
however, echo immediately after that shows the old values (with wp-content value). I tried echo because in wp admin I couldn't see the theme from new location, of course.
I have installed wp in example/wp subdirectory and site itself is example - I copied over .htaccess and index.php over to the root and everything is working fine, I just need to move wp-content into another folder over at root also with a different name.
Share Improve this question asked Jun 23, 2013 at 16:54 KeyframeKeyframe 1431 gold badge1 silver badge4 bronze badges 1 |1 Answer
Reset to default 15You have probably added the definitions too late. If in fact you added that "to the end" of wp-config.php
then you added it after these lines:
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
If so, then those constants are already defined (wp_initial_constants
) and you cannot redefine a constant after it is already defined.
Make your edits earlier, before:
/* That's all, stop editing! Happy blogging. */
本文标签: Changing WPCONTENTDIR and WPCONTENTURL in wpconfigphp does not register
版权声明:本文标题:Changing WP_CONTENT_DIR and WP_CONTENT_URL in wp-config.php does not register? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745569005a2663932.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
/
before somedir is superfificous (double) in line 1. – Frank N Commented Sep 5, 2015 at 15:58