Oct 20
Fixed blog
Sorted out the problem I had before after upgrading to WordPress 2.6.2. It was to do with my unorthodox wp-config.php file. When WordPress is installed all the files, code, content and templates, go into /usr/share/wordpress. A while back I wanted to run multiple blogs on the one system, with different contents and templates, but I wanted them to share the same code.
The solution (which I can’t remember where I found) is all the code files and directories for the blog are symlinks back to /usr/share/wordpress, but the wp-content directory is local for each blog, then an Apache environment variable is set for each blog to point to its config file.  I won’t go into the details because it doesn’t work anymore. The problem now is the ABSPATH constant is being set in a new file wp-load.php before wp-config.php is loaded where it used to be set.Â
ABSPATH points to the base directory for the WordPress files. I need it to point to the local (per-blog) location, but wp-load.php is forcing it to /usr/share/wordpress. My new solution is to have the ABSPATH I want stored in a Apache environment file and hack wp-load.php to set ABSPATH to that. It’s much more ugly because I am now hacking code files instead of just config files, but it works.
In my Apache conf file I have: SetEnv BLOG_ABSPATH "/home/david/www/blog"
My wp-load.php is hacked so that it has: define('ABSPATH', $_SERVER['BLOG_ABSPATH']);
Then the files in /home/david/www/blog are either symlinks to /usr/share/wordpress or real files depending on whether I want them shared for all blogs or just for this one.
Funny thing is I’m no longer running multiple blogs, but I still prefer to have it as an option. And this way means my local stuff lives under /home, while the code still stays in /usr/share/wordpress.
