These are the instructions needed to upgrade WordPress Manually on a linux (CentOS 6) system.
Requirements
- WordPress has been fully installed and configured
- Have root Priveleges
I also suggest backing up your data which can be done using Akeeba as explained here
Manual Upgrade
Go to your WP root Directory
[ahmed@amayem ~]$ cd /var/www/wpsiteroot/
Download the latest version:
[ahmed@amayem wpsiteroot]$ sudo wget http://wordpress.org/latest.zip
Unzip the latest version
[ahmed@amayem wpsiteroot]$ sudo unzip latest.zip
This will have created a wordpress
directory. Delete the latest.zip
file
[ahmed@amayem wpsiteroot]$ sudo rm latest.zip
Let’s take a look at the contents of the wordpress
directory:
[ahmed@amayem wpsiteroot]$ cd wordpress/
[ahmed@amayem wordpress]$ ls
index.php wp-cron.php
license.txt wp-includes
readme.html wp-links-opml.php
wp-activate.php wp-load.php
wp-admin wp-login.php
wp-blog-header.php wp-mail.php
wp-comments-post.php wp-settings.php
wp-config.php wp-signup.php
wp-config-sample.php wp-trackback.php
wp-content xmlrpc.php
Looks like the same as the actual wordpress directory.
Go back up to the site root and delete wp-admin
and wp-includes
[ahmed@amayem wordpress]$ cd ..
[ahmed@amayem wpsiteroot]$ sudo rm -r wp-admin wp-includes/
Move the new wp-admin
and wp-includes
into the site directory:
[ahmed@amayem wpsiteroot]$ sudo mv wordpress/wp-admin wp-admin
[ahmed@amayem wpsiteroot]$ sudo mv wordpress/wp-includes/ wp-includes
Let’s make a backup of wp-contents
, just in case:
[ahmed@amayem wpsiteroot]$ sudo cp -r wp-content wp-content-backup
Copy the contents of wp-contents
into the old wp-contents
:
[ahmed@amayem wpsiteroot]$ sudo cp -rv wordpress/wp-content/* wp-content/
You might want to go through the directory and check that your old stuff is still there.
Delete the wp-content
that we copied from:
[ahmed@amayem wpsiteroot]$ sudo rm -r wordpress/wp-content
Copy the rest of the loose files in wordpress
to the site root directory:
[ahmed@amayem wpsiteroot]$ sudo mv wordpress/* .
Check that nothing is left in wordpress
, then remove the empty directory:
[ahmed@amayem wpsiteroot]$ ls wordpress/
[ahmed@amayem wpsiteroot]$ sudo rm -r wordpress/
Voila done. Decide what you want to do with wp-content-backup
.