I’ve been trying to move the wp-content folder out of the main WP folder.
I’ve p a i n s t a k i n g l y followed all of the instructions here:
I’m testing with a completely fresh, unaltered, unconfigured WP 2.9.2 with no plug-ins. I’ve tried with MAMP, and on a hosted (FreeBSD/Apache) server at a very reputable host that fully supports WP.
No matter what I do, WP just completely ignores the WP_CONTENT_DIR and WP_CONTENT_URL define commands in wp-config.
(I’m not doing anything wrong with my paths — because the old location of wp-content continues to work — and testing with a PHP echo of WP_CONTENT_DIR shows that the original path is remaining unaltered.)
But all this actually makes sense — because my further testing shows that wp-settings.php (which defines WP_CONTENT_DIR and WP_CONTENT_URL) is running prior to wp-config.php as each WP page is rendered.
In PHP, a constant (like WP_CONTENT_DIR and WP_CONTENT_URL) cannot be changed during script run. So it is impossible for a define command in wp-config.php to alter WP_CONTENT_DIR and WP_CONTENT_URL if they have been already been defined in wp-settings.php.
So… do I have a special version of WP, and the code runs in the right order for everyone else?
- The topic ‘Moving wp-content Folder versus Order of WP Script Loading’ is closed to new replies.