Archive for the ‘install’ tag
Upgrading WordPress via SSH
WordPress is quite a popular open source CMS that is often praised for its ease of use and simple installation. Like most open source applications, WordPress tends to have upgrades every few months to improve security, stability and the underlying framework.
In recent versions of WordPress, this process has been extremely easy with an automatic upgrade system (something that has also been integrated into the plugin framework too) but on older versions, the process wasn’t particularly straight forward.
Thankfully, I found a rather useful set of commands that you can run on your server via SSH to make this process extremely simple.
Disclaimer: I recommend you always take a backup of the database and working folder before running these commands in case something goes wrong. 99% of the time, I’ve not had any problems with this process but it’s better to be safe than sorry.
# Get the latest WordPress version available. wget http://wordpress.org/latest.tar.gz # Uncompress it. tar xfz latest.tar.gz # Delete the old wp-includes and wp-admin directories. rm -rf ./wp-includes/ rm -rf ./wp-admin/ # Go to the new Wordpress directory: cd wordpress/ # Copy the downloaded files to your existing WP install, overwriting any old files. cp -rpf -f * ../ # Remove the uncompressed and downloaded files. cd .. rm -rf ./wordpress/ rm -f latest.tar.gz # Visit your blog and upgrade the database (if needed).
Make sure you visit your WordPress installation in the browser straight away to run any upgrade scripts that are required. You should only see one screen and that process is complete.





