On our WordPress web hosting infrastructure, customers can either use:
- WordPress Toolkit or
- Softaculous WordPress Manager or
- WP-CLI or
- WP Squared
to install WordPress with one 1-click.
After installing your WordPress, you can use our WordPress Site Optimization plugin to help your WordPress run like a dream.
The most important thing to bear in mind is that like most WordPress optimization plugins, WordPress Site Optimization plugin updates/adds rules such as the one below when you enabled the plugin at cPanel >> Software >>> AccelerateWP.
ExpiresActive on ExpiresDefault "access plus 1 month" ExpiresByType text/cache-manifest "access plus 0 seconds" ExpiresByType text/html "access plus 0 seconds" ExpiresByType text/xml "access plus 0 seconds" ExpiresByType application/xml "access plus 0 seconds" ExpiresByType application/json "access plus 0 seconds" ExpiresByType application/rss+xml "access plus 1 hour" ExpiresByType application/atom+xml "access plus 1 hour" ExpiresByType image/x-icon "access plus 1 week" ExpiresByType image/gif "access plus 4 months" ExpiresByType image/png "access plus 4 months" ExpiresByType image/jpeg "access plus 4 months" ExpiresByType image/webp "access plus 4 months" ExpiresByType video/ogg "access plus 4 months" ExpiresByType audio/ogg "access plus 4 months" ExpiresByType video/mp4 "access plus 4 months" ExpiresByType video/webm "access plus 4 months" ExpiresByType image/avif "access plus 4 months" ExpiresByType image/avif-sequence "access plus 4 months" ExpiresByType text/x-component "access plus 1 month" ExpiresByType font/ttf "access plus 4 months" ExpiresByType font/otf "access plus 4 months" ExpiresByType font/woff "access plus 4 months" ExpiresByType font/woff2 "access plus 4 months" ExpiresByType image/svg+xml "access plus 4 months" ExpiresByType application/vnd.ms-fontobject "access plus 1 month" ExpiresByType text/css "access plus 1 year" ExpiresByType application/javascript "access plus 1 year" AddOutputFilterByType DEFLATE application/atom+xml \ application/javascript \ application/json \ application/rss+xml \ application/vnd.ms-fontobject \ application/x-font-ttf \ application/xhtml+xml \ application/xml \ font/opentype \ image/svg+xml \ image/x-icon \ text/css \ text/html \ text/plain \ text/x-component \ text/xml truncated ...
To keep your websites secure, you definitely need to regularly update WordPress: themes, plugins, and core.
But if not carefully done, updating a WordPress website manually can potentially break your WordPress website.
So to ensure a WordPress installation is always updated safely without breaking your website, WordPress Toolkit comes with a Smart Updates feature, which helps you keep your production websites up-to-date without the risk of breaking your website.
Smart Updates analyses the potential consequences of installing updates and advises whether doing so is safe.
That is why Smart Updates does the following before each update:
- Smart Updates clones the installation and then analyses the clone. The clone is stored within the installation path under a hidden directory using the name structure of ".wp-toolkit_X", where X represents a variable character to ensure the directory has a unique name.
- Smart Updates automatically test updates for themes, plugins, languages, and WordPress itself in a completely safe environment at no risk to your live website.
- Smart Updates (manual) shows you the "before" and "after" screenshots and the estimation of whether it is safe to update or not. Here you can compare the screenshots, confirm whether you believe it is safe to update, and then decide whether to update the production website or not.
- If an automatic update, Smart Updates automatically updates the production website if the amount of changes does not exceed the threshold. Else, the update is not performed.
This ought to be the normal flow and makes Smart Update better at predicting safe updates and minimizes the possibility of installing updates that can break your website.
But when you have the rules that the Site Optimization plugin adds to your (dot.)htaccess file, you will get an error after the pre-update calculation phase with a message similar to the one below:
Unable to perform Smart Update on this website because the site clone is different from the original. This might happen due to the following .htaccess customizations: AddDefaultCharset UTF-8. Try adjusting these .htaccess file customizations if you need to run Smart Update on this website.
To successfully update your WordPress core, themes, and plugins when using WordPress Toolkit and Site Optimization, we recommend following these steps below:
Make a backup of your current (dot).htaccess file.
As you may know, WordPress uses this file to manipulate how Apache serves files from its root directory and subdirectories thereof.
Most notably, WP modifies this file to handle permalinks.
You can do this either using the command line or with cPanel File Manager:
CLI:
pwd
This assumes that you are in your hosting account home directory.
ls -al public_html
cd public_html && cp .htaccess ~/public_html/htaccess.`date -I`-backup
Check out the date/time man page for more formatting options.
vim ~/public_html/.htaccess
Remove all directives except the basic WP that look like this:
# BEGIN WordPress Rewrite Directives ***** # END WordPress
Using cPanel File Manager To Copy A File:
- Select the file (dot).htaccess you want to copy.
If you are unable to see this file, click on Settings and select Show Hidden Files (dotfiles) to display hidden files in the interface.
- Click Copy from the toolbar at the top of the interface. The Copy interface will appear.
You can also right-click and select Copy from the menu.
- In the Copy interface, enter the file path for which you want to save the item in the Enter the file path that you want to copy this file to: text box.
- Click Copy File(s) to copy the files.
Go back to WordPress Toolkit and re-run the update using Smart Update.
You will notice that this will be completed without any issues.
Once completed, you must replace the existing, modified (dot).htaccess file with the backed up (dot).htaccess file.
You can do that with:
pwd
This assumes that you are in your hosting account public_html.
mv htaccess.$date-$time-backup ~/public_html/.htaccess
If using cPanel File Manager, rename the existing (dot).htaccess to htaccess-orig and then upgrade the earlier backed-up file to become the new (dot).htaccess.