WordPress Manual Upgrade for Experts: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 19: | Line 19: | ||
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. | ||
-a = -dpR = Preserve Symbolic Links and Recursive | |||
-x = Exclude mount points, and thankfully this switch applies to several commands so it isn't documented in the MAN page for cp. | |||
</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. If you do choose to make a copy, you'll need to delete it or move it so the original directory name can be used for the upgrade files. | 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. If you do choose to make a copy, you'll need to delete it or move it so the original directory name can be used for the upgrade files. | ||
Line 35: | Line 37: | ||
tar -xf WhatEverFIleName | tar -xf WhatEverFIleName | ||
</syntaxhighlight> | </syntaxhighlight> | ||
*Move or copy the ''extracted'' files to the ''original'' web server directory: mv Source Destination | *Move or copy the ''extracted'' files to the ''original'' web server directory: mv Source Destination | ||
*Set the proper ownership and file permissions on the new files (the below example is for Apache on CentOS) | *Set the proper ownership and file permissions on the new files (the below example is for Apache on CentOS) | ||
Line 42: | Line 45: | ||
find /var/www/html/WebSiteDirectory -type f -exec chmod 644 {} \; | find /var/www/html/WebSiteDirectory -type f -exec chmod 644 {} \; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
*Copy the working version of the WordPress website files into the new directory (The below command will not overwrite any of the new files and will also preserve all permissions from the "original / working" WordPress version. The end result is a directory with upgraded WordPress Files and all of the additional or custom stuff from the original site | *Copy the working version of the WordPress website files into the new directory (The below command will not overwrite any of the new files and will also preserve all permissions from the "original / working" WordPress version. The end result is a directory with upgraded WordPress Files and all of the additional or custom stuff from the original site | ||
<syntaxhighlight lang="text"> | <syntaxhighlight lang="text"> | ||
Line 49: | Line 53: | ||
Flags can be combined, IE -Rnvax, but are shown separately for clarity. | Flags can be combined, IE -Rnvax, but are shown separately for clarity. | ||
</syntaxhighlight> | </syntaxhighlight> | ||
*Make sure the wp-config.php file is in the upgrade directory (The "original / working" version of the file should be copied with the above CP command as it does not typically exist in a newly extracted version of WordPress (it's generated)) | *Make sure the wp-config.php file is in the upgrade directory (The "original / working" version of the file should be copied with the above CP command as it does not typically exist in a newly extracted version of WordPress (it's generated)) | ||
*Also remember a LOT of extensions make use of an .htaccess file (with Apache and other web servers) to modify the behavior of a WordPress site, so make sure that file from the original version of that file is copied into the upgrade directory (its a hidden file, so make sure). | *Also remember a LOT of extensions make use of an .htaccess file (with Apache and other web servers) to modify the behavior of a WordPress site, so make sure that file from the original version of that file is copied into the upgrade directory (its a hidden file, so make sure). |