WordPress Manual Upgrade for Experts: Difference between revisions
m →Upgrade |
mNo edit summary |
||
| Line 1: | Line 1: | ||
There | There ''so many'' websites detailing how to manually upgrade a WordPress Site. The vast majority of them seem to be done by people with very little experience with all of the technologies behind WordPress like Linux (CentOS, Ubunto, etc.), PHP, Apache (Nginx, IIS, or other web servers), mySQL (MariaDB, SQL Server, etc.), and others. I mean no offense to them as they are talented in their own right and just trying to help. It did make But it did make me think writing something about a simpler (and safer) way to upgrade a WordPress installation by leveraging more technically adept techniques. So I did. | ||
It also brings up the question, "Why upgrade manually?" For me it was born of a desire to stay within the 4.X.Y series I was using instead of the 5.X.Y version offered. There is a method to change the automatic upgrade method to ignore major version upgrades and only install minor versions (Major#.Medium#.Minor#), but after testing I determined it did not affect the manually triggered upgrade button. | |||
Anyway, onto the detailed steps that leverage the command line and phpMySQL... | |||
==BACKUP!== | ==BACKUP!== | ||
First of all BACK EVERYTHING UP!!! Don't take a chance that the upgrade will mess something up, make a backup. For WordPress, that consists of two items: The website files and the | First of all BACK EVERYTHING UP!!! Don't take a chance that the upgrade will mess something up, make a backup. For WordPress, that consists of two items: The website files and the database. | ||
===Website Files=== | ===Website Files=== | ||
Backup the website files | Backup the website files by making a copy;<syntaxhighlight lang="text"> | ||
mv WebSiteDirectory WebSiteDirectory.WorkingVersionX.Y.Z | mv WebSiteDirectory WebSiteDirectory.WorkingVersionX.Y.Z | ||
...The original files will then be used to copy into the directory with the upgrade version, covered a few steps later. | ...The original files will then be used to copy into the directory with the upgrade version, covered a few steps later. | ||
</syntaxhighlight>The above is the quickest way to preserve a functional version of the website files (the MV command does not change permissions) | </syntaxhighlight>The above is the quickest way to preserve a functional version of the website files (the MV command does not change permissions). | ||
The next step isn't necessary, but if you want to make a | The next step isn't necessary, but if you want to make a copy of the website files and test those copies for functionality and peace of mind, use the below command;<syntaxhighlight lang="text"> | ||
cp -ax WebSiteDirectory.WorkingVersion.X.Y.Z WebSiteDirectory | cp -ax WebSiteDirectory.WorkingVersion.X.Y.Z WebSiteDirectory | ||
The WebSiteDirectory will need to be erased before copying the new updated WordPress files. | The WebSiteDirectory will need to be erased before copying the new updated WordPress files. | ||
</syntaxhighlight> | </syntaxhighlight>When testing the functionality of the site, it should be completely functional since the above command copies all files and directories (sub-directories too), retains permissions, retains symbolic links, IE makes an ''exact'' duplicate. | ||
===Database=== | ===Database=== | ||
For the database, use the command line or phpMyAdmin. phpMyAdmin makes it really easy. Select the database, | For the database, use the command line or phpMyAdmin. phpMyAdmin makes it really easy. Select the database in the left pane, Export Tab, "Simple" Radio Button, Go Button, save it to a file, done. | ||
===Other Thoughts=== | ===Other Thoughts=== | ||