Get WP Install Directory

The WordPress directory path is available in the constant ABSPATH. Be aware this is not related to the wp-content directory. The constant WP_CONTENT_DIR could be set to exactly the same value. Or another directory on the same level where WP_CONTENT_URL is another domain name. There doesn’t even have to be a wp-content equivalent: themes, plugins, … Read more

Moving wordpress from /dir to main folder

Make sure you backup everything then: Move the content of /dir one level up, make sure you move hidden files as well (I care about the .htaccess file and maybe a .git folder) Download Search & Replace for WordPress, upload it to your server Access it with the url: http://www.xclo.co.uk/searchreplacedb2.php Follow the instructions, in brief, … Read more

Conditional config WP_HOME/WP_SITEURL does not update bloginfo(‘template_url’)?

Found the solution… the problem was due to placement of the conditional statement in the wp-config.php file. It needed to be inserted before the require_once(ABSPATH . ‘wp-settings.php’); line near the bottom of the default config file, otherwise the constants are already defined and cannot be redefined. So final section of the wp-config.php file now looks … Read more