An easy upgradeable installation
-
The following post might be a bid long, but I hope you can find time to read it all as I try to explain my point π
Every time a new version of WordPress is released, I find my self shutting down my blog and merging the content between the two installations (mainly .htaccess, wp-config.php and the wp-content folder). This is a painful procedure prone to error and the site is down in the meantime. So I’ve set out to find an easier way:
The root of my home-directory contains a folder called httpdocs whose content is viewable from the net. Previously this was where I placed my WordPress installation. Instead I’ve now created a separate folder for each version I install at the same level as the httpdocs folder (i.e. wordpress-2.0.2 and wordpress-2.0.3). Then I’ve created a symbolic link called “wordpress-latest” which points to the current running WordPress installation. This gives me the following directory structure:
httpdocs
wordpress-2.0.2
wordpress-2.0.3
wordpress-latest -> wordpress-2.0.3I’ve then created a lot of symbolic links in my httpdocs folder, like this:
index.php -> ../wordpress-latest/index.php
license.txt -> ../wordpress-latest/license.txt
readme.html -> ../wordpress-latest/readme.html
wp-admin -> ../wordpress-latest/wp-admin
wp-atom.php -> ../wordpress-latest/wp-atom.php
...etc.The only folder that I have not symlinked to the ../wordpress-latest directory is wp-content. This of cause needs be the same from installation to installation.
In case the classic or default theme or the akismet plugin where to be upgraded I’ve (inside the wp-content directory) made symbolic links to those folders or files in the wordpress-latest folder. The files and folders that I’ve symlinked in httpdocs/wp-content/ is the following:
index.php -> ../../wordpress-latest/wp-content/index.php
plugins/akismet -> ../../../wordpress-latest/wp-content/plugins/akismet
plugins/hello.php -> ../../../wordpress-latest/wp-content/plugins/hello.php
plugins/wp-db-backup.php -> ../../../wordpress-latest/wp-content/plugins/wp-db-backup.php
themes/classic -> ../../../wordpress-latest/wp-content/themes/classic
themes/default -> ../../../wordpress-latest/wp-content/themes/defaultAll this means that I should just need to change the wordpress-latest symlink to point to whatever new installation of WordPress I might install (i.e. wordpress-2.0.4).
But hereβs the problem: When referring to a file via a symlink the scope also changes. This means that if I refer to a file that is actually in the wordpress-2.0.3 folder this file can no longer se the real wp-content folder which is actually in the httpdocs folder.
Does anybody know how to get this scheme to work or of another similar way to achieve this?
Thanks for listening π
/watson
The topic ‘An easy upgradeable installation’ is closed to new replies.