WordPress Manual Upgrade for Experts: Difference between revisions

mNo edit summary
mNo edit summary
Line 33: Line 33:
*Set the proper ownership and file permissions on the new files (the below example is for CentOS and Apache);<syntaxhighlight lang="text">
*Set the proper ownership and file permissions on the new files (the below example is for CentOS and Apache);<syntaxhighlight lang="text">
chown -R apache:apache /var/www/html/WhatEverDirectory
chown -R apache:apache /var/www/html/WhatEverDirectory
find /var/www/html/WhatEverDirectory -type d -exec chmod 755 {} \;                       
find /var/www/html/WebSiteDirectory -type d -exec chmod 755 {} \;                       
find /var/www/html/WhatEverDirectory -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 above command will not overwrite any of the new files and will also preserve all permissions from the "working" WordPress files.  The end result is upgraded WordPress Files and any custom stuff in the same directory);<syntaxhighlight lang="text">
*Copy the working version of the WordPress website files into the new directory (The above command will not overwrite any of the new files and will also preserve all permissions from the "working" WordPress files.  The end result is upgraded WordPress Files and any custom stuff in the same directory);<syntaxhighlight lang="text">
cp -R -n -v -a -x /var/www/html/WorkingWebSite/* /var/www/html/WebSite Note: Flags can be combined, IE -Rnvax, but are shown separately for clarity.
cp -R -n -v -a -x /var/www/html/WebSiteDirectory.WorkingVersion/* /var/www/html/WebSiteDirectory
 
Note: 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 (there shouldn't be a wp-config.php file in the upgrade folder and it should be copied with the above CP command)
*Make sure the wp-config.php file is in the upgrade directory (there shouldn't be a wp-config.php file in the upgrade folder and it should be copied with the above CP command)