LinuxSoftware

Coding and tramping in Aotearoa / New Zealand


Oct 20

Fixed blog

, david, Monday, 5:08 pm

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.


Oct 17

Broken blog

, david, Friday, 8:57 am

It’s Friday morning and before leaving for Te Aroha I decided to update WordPress to 2.6.2.  This has broken my theme :-( .  There is WiFi at the motel, maybe I’ll get it fixed down there.  Not going to do anything more on it right now, so you’re stuck with the default theme.


May 2

Now with WordPress 2.5.1

, , , , , david, Friday, 7:58 pm
wp2.5.1

WordPress 2.5.1 showed up in the Fedora Yum repository, so I decided it was time for an upgrade. Went pretty smoothly. I upgraded WPG2 to 2.3.0.5 while I was at it. The G2 button wasn’t showing up in the editor, but a cache clear has fixed that. I was worried about the theme, but it looks like it is all compatible. Still getting used to the new WordPress Dashboard, I guess it grows on you?

I also installed Finch on my server (rata). Finch is the text UI equivalent of Pidgin. Having a TUI messaging client is great, because I can use it over SSH.