To improve WordPress site performance, we have enabled a Site Optimization Module for all web hosting accounts.
The module is 100% automated with no manual action needed aside.
To start speeding up your website for free, all you have to do is to toggle a switch and apply the automatically generated advice.
HOW TO START
Enabling Site Optimization capabilities is a 1-click affair.
To start, visit your cPanel and log in.
Scroll down to the "Software" section.
Click on AccelerateWP.
When the page loads, (and if you have a WordPress website installed on your hosting account), you will be greeted with an option to toggle WordPress Site Optimization.
Before you can use WordPress Site Optimization, you need to turn off conflicting plugins using your WordPress admin page.
If you don't, you won't be able to enable the plugin and will meet a warning like this: "Incompatibility: Conflicting plugins are enabled. Found conflicting plugins: $pluginName".
How To Deactivate Existing WordPress Caching Plugin
Login to your WordPress admin either via WordPress Toolkit, WordPress Manager, or using admin email and password.
Visit your WordPress Plugins to see a list of installed plugins.
On locating the WordPress caching plugin you have been using, click Deactivate.
You can also use this command:
wp plugin deactivate $pluginName
But it is simply not enough to deactivate a plugin.
Often these plugins do add directives to your existing config files (e.g. htaccess)
So go back to your cPanel File Manager and inspect your hosting account .htaccess.
To locate all .htaccess files in your hosting account, either scroll down to the Advanced section and click on Terminal for cPanel.
Accept the warning notice "I understand and want to proceed" and click to proceed.
Or use your local machine SSH terminal.
Type in the next command:
find . -name .htaccess
You can also find this file by enabling the "Show Hidden Files" option in cPanel File Manager.
1. To use this option, log in to the cPanel account for the website.
2. Click on the File Manager icon under the Files section.
3. In the upper right corner of File Manager, click on the Settings button.
4. Put a check next to "Show hidden files" if it is not already checked and click Save.
(This is required for you to be able to see the .htaccess file in File Manager).
5. Locate the .htaccess file for your website within the File Manager, or create one if it does not already exist.
6. Select the .htaccess file and click on the "Edit" button in the toolbar along the top of File Manager.
7. Make sure that there is no remaining directive left by the now-deactivated caching plugin in any of the htaccess files.
8. Click the Save Changes button in the upper right corner
If you are not sure how to edit this file, consider creating a new .htaccess file.
If you are proficient with the command-line interface, you can easily do this with
mv -vi .htaccess .htaccess.{,.backup}
or:
mv -vi /home/$username/public_html/.htaccess{,.backup}
Then create a new one with:
touch /home/$username/public_html/.htaccess
chown $username:$username /home/$username/public_html/.htaccess
If you don't want to use the command-line interface, then use cPanel File Manager.
1. Log in to the cPanel account for the website.
2. Click on the File Manager icon under the Files section.
3. In the upper right corner of File Manager, click on the File button.
4. Fill in the "New File Name:" as .htaccess. Please make sure you are in the correct directory.
5. Click the "Create New File"
You can also generate a .htaccess file by using cPanel's MultiPHP INI Editor or Select PHP Version.
Having edited or recreated your WordPress .htaccess file, visit https://wordpress.org/support/article/htaccess/ to see and copy the examples of WordPress .htaccess rules.
It is worth mentioning at this point that when Apache reads a .htaccess file, the rules are applied recursively to any sub-directories from where the rule was found.
For example, if .htaccess is located in the path "/$sername/public_html/.htaccess", any rule you add here will also affect any of the sub-directories located within "public_html".
There is one more thing to do before you can enable the WordPress Site Optimization plugin.
Disable mod_pagespeed
mod_pagespeed is available in all production regions.
But it is not enabled server-side.
To use mod_pagespeed, customers have to explicitly enable it on per domain/website basis.
WordPress Site Optimization plugin is not compatible with mod_pagespeed.
If used together, this will cause duplication of tasks which will lead to unexpected results (since they are using almost the same mechanism to optimize the site).
If you will be using WordPress Site Optimization, you need to remove this directive with the 3 lines that have the following in it:
ModPagespeed on
Or comment them out like this:
# # ModPagespeed off #
then save the .htaccess file.
Turn on CL Site Optimization Module
Once that is done, return to Software >>> AccelerateWP.
Toggle the Site Optimization to enable the plugin.
Now that the process is completed, visit your WordPress Admin >>> Plugins to see CloudLinux Site Optimization listed and enabled:
Click Settings.
Explore the various options and features.
Visit cPanel File Manager.
Open your .htaccess and you will see the new directives auto-configured for you.