AccelerateWP: Speeding up WordPress in cPanel Print

  • wordpress, weboldal sebesség, cpanel, cloudlinux
  • 0

AccelerateWP is CloudLinux’s WordPress acceleration tool. With a single toggle, you can enable full-page caching for your WordPress site, cache preloading and the minification of CSS and JavaScript files; all other optimisations (lazy image loading, JavaScript deferral, database cleaning) can be enabled in one place within the WordPress admin panel. There’s no need to search for and configure a caching plugin: AccelerateWP installs and configures the necessary plugin for you. You can use it free of charge with our WordPress hosting plans. It is not available with cPanel hosting plans; there, the W3 Total Cache plugin and MAx Cache speed up your WordPress site.

The cache serves the finished HTML page to the visitor, so the server does not need to run PHP or query the database every time a page is opened. This results in shorter loading times (particularly the time to first byte, TTFB) and uses fewer of the hosting plan’s resource limits.

Requirements: WordPress 5.8 or later, PHP 7.4 or later, and no other caching plugins should be running on the site (e.g. WP Super Cache, W3 Total Cache, WP Fastest Cache, LiteSpeed Cache or WP Rocket). Cannot be used on a WordPress Multisite network.

Where can you find it?

Log in to cPanel and, in the Software section, click on the AccelerateWP icon.

cPanel Software group: AccelerateWP menu item

The My WordPress Sites table lists the WordPress sites found in your cPanel account. Next to the Website column, the AccelerateWP column indicates caching and file optimisation, while the AccelerateWP Premium column indicates the Redis object cache (we’ll discuss this below, in the section on the WP Pro plan). A cell may contain the following:

  • No advice: the system has not yet suggested this feature for this page. You can still enable it manually.
  • Advice available: after analysing slow requests to the website, the system suggests that you enable this feature.
  • Active: the advice has been applied; the feature is working.
  • Red exclamation mark: something is preventing the function from working. Click on it and the pop-up window will show the reason and, in the How to fix? section, what to do.

If you have recently installed a new WordPress site and it does not yet appear in the list, click the Refresh button.

The AccelerateWP My WordPress Sites table, with the Website, AccelerateWP and AccelerateWP Premium columns

Tip: if the site has a test environment (a staging copy created using the WP Toolkit cloning function), this will also appear in the table. You can test the settings there before enabling them on the live site.

Switching it on from advice

If the AccelerateWP column shows Advice available:

  1. Click on the Advice available link. In the Advice window, you will see the ‘Turn on AccelerateWP feature’ advice and the pages which the system predicts will be accelerated (N pages are expected to be speed up). The status of the advice is then Review.
  2. Click on the Apply advice button.
  3. The status changes to Pending, and the progress is shown as a percentage in place of the button (Processing…). Within half a minute, the status becomes Applied, and Active appears in the table.

The AccelerateWP Advice window: Turn on AccelerateWP feature, a list of pages expected to load faster, and the Apply advice button

CloudLinux compiles this advice from slow requests received by the website (using the same data that the X-Ray App’s tracking also displays). The URLs listed are merely examples: the cache applies to all public pages on the website.

Manual activation

If the cell shows No advice, or if you do not wish to wait for the advice:

  1. Move your mouse over the AccelerateWP cell in the row on the page. A cog icon will appear on the right-hand side of the cell; click on it.
  2. In the Features window, switch on the AccelerateWP toggle.
  3. After a few seconds, the notification ‘Success – The module was successfully enabled.’ will appear, indicating that the feature is working. You can close the window by clicking the Cancel button or the ‘X’ in the top right-hand corner.

The AccelerateWP Features window with the AccelerateWP switch enabled

What happens when the service is switched on?

AccelerateWP installs and activates the WordPress plugin called AccelerateWP (which you can see on the Plugins page in the WordPress admin panel), and enables it by default:

  • full-page caching (with a separate cache for mobile visitors),
  • pre-loading the cache, which rebuilds cached pages in the background, so that even first-time visitors do not have to wait,
  • the minification of CSS and JavaScript files,
  • reducing the layout shifts that occur when fonts load,
  • browser caching and compression for static files (CSS, JavaScript, images, fonts),
  • MAx Cache, if the plugin finds the module on the server (see below).

The cache is intended for visitors who are not logged in: as a logged-in WordPress user (including admins), you will see the page freshly generated by PHP. You should therefore view the speed improvement in a private browser window. You can tell that the page is being served from the cache by the fact that this line appears at the very end of the source code (Ctrl+U, Cmd+Option+U on a Mac):

<!-- Performance optimized by AccelerateWP. - Debug: cached@... -->

By default, the cache does not store URLs containing the ? character (i.e. those with query parameters); these continue to be generated by PHP each time.

Permalinks: if WordPress is using the default ‘Plain’ permalinks (in the format ?p=123), the plugin will display the warning ‘A custom permalink structure is required for the plugin to work properly’. In the WordPress admin panel, on the Settings › Permalinks page, select a different format, such as the Post name setting. On a live site, this will also change the old URLs, so it is best to do this when the site is first launched.

Settings in the WordPress admin panel

You can find the AccelerateWP settings in the WordPress admin under Settings › AccelerateWP, or in the AccelerateWP › Settings menu of the top toolbar. This description follows version 3.24 of the plugin. In the left-hand menu, besides Dashboard and Content Delivery, there are groups (Cache, Page Optimization, Backend, Tools) that expand when you click them:

Menu item What it claims Default settings after switching on
Dashboard Quick actions: clearing and reloading the cache –
Cache › Preload Cache pre-loading, link pre-loading Preloading on, link preloading off
Cache › Cache Rules URLs, cookies and browsers excluded from the cache, URLs to always purge, query strings to cache, User Cache (for logged-in users) User Cache off
Page Optimization › Media Lazy loading for images, CSS background images, iframes and videos; missing image dimensions and fonts Reduce font-related layout shifts on, the rest off
Page Optimization › JavaScript & CSS Minifying and combining CSS and JavaScript files, and deferred and lazy loading of JavaScript Enable CSS and JavaScript minification, disable all others
Backend › Database Deleting post versions, automatic drafts, the rubbish bin, spam and transient entries; optimising tables All off
Backend › Heartbeat Reducing the frequency of the WordPress Heartbeat API Control Heartbeat on, Reduce activity
Tools › Add-ons One-click add-on: MAx Cache On, if the MAx Cache module is available on the server

AccelerateWP settings in the WordPress admin: the Page Optimization › JavaScript & CSS page with the Minify JavaScript files setting enabled

What should you enable?

  • Media › Enable for images and Enable for iframes and videos: images and embedded videos only load when the visitor scrolls to them. On image-heavy pages, blogs and online shop product listings, this gives the most visible improvement. If an image does not appear (for example the first image of a slider or gallery), enter its file name in the exclusion list below the setting.
  • Media › Add missing image dimensions: reduces the “jumping” of the page layout while it loads (the CLS metric of Core Web Vitals).
  • JavaScript & CSS › Load JavaScript deferred and Delay JavaScript execution: these improve the measured scores the most, but they can cause errors with some themes and plugins (menus, sliders, forms, cookie banners). Turn them on one at a time, and after each change, click through the site in a private window.
  • Combine JavaScript files rarely improves performance with HTTP/2 (which our servers use), so leave this disabled.
  • Database: the clean-up cannot be undone. Before you start, make a backup.

The Content Delivery page (CDN) and Enable image optimization on the Media page are separately charged CloudLinux services, and our hosting plans do not include them. Reducing the size of images is covered in the article on speeding up WordPress.

MAx Cache: a cache without PHP

The CloudLinux MAx Cache Apache module also runs on our servers. When it is enabled, cached pages are served directly by the web server without starting PHP, which shortens the response time further and reduces resource usage. AccelerateWP turns it on automatically when it is enabled, if it finds the module on the server. Its status is shown by the Add-on status switch in the MAx Cache box on the Tools › Add-ons page of the settings, where you can also turn it on or off; the details and how to check it are described in the article on MAx Cache.

Clearing the cache

When you edit a post or page, AccelerateWP clears the cache of the affected pages automatically, and preloading rebuilds them in the background. If a change (for example to the theme or a plugin setting) is still not visible to logged-out visitors, clear the whole cache: in the top toolbar, choose AccelerateWP › Clear and Preload Cache, or on the Dashboard page of the settings, click the CLEAR AND PRELOAD button in the Cache Files section.

The AccelerateWP menu in the WordPress top toolbar, with the Clear and Preload Cache item

If the site is behind Cloudflare or another CDN, please clear its cache as well.

Redis object cache in the WP Pro plan

The WP Pro hosting plan for WordPress also includes the AccelerateWP Redis object cache. This stores the results of frequently used database queries in memory, thereby providing acceleration even where full-page caching is ineffective: in the shopping basket and checkout of online shops, for logged-in users, and within the WordPress admin interface. It is particularly useful for high-traffic WooCommerce online shops and membership sites. While the AccelerateWP Premium column appears in the table for the other packages, the Redis object cache is only available in the WP Pro plan.

To enable this:

  1. In the AccelerateWP Premium column, click the Advice available link if there is one (“Turn on Object Caching”), then the Apply advice button. Without advice, move the mouse over the cell, click the gear icon, and turn on the Redis Object Cache switch in the Features window.
  2. After a few seconds, the notification “Success – The module was successfully enabled.” shows that the feature is working.

The AccelerateWP Features window with the Redis Object Cache switch turned on

AccelerateWP starts a separate Redis instance for your hosting account and installs the Redis Object Cache WordPress plugin with its object-cache.php file. In the WordPress admin, the Status: Connected line on the Settings › Redis page shows that the object cache is working, and an Object Cache menu appears in the top toolbar. Don’t deactivate or delete this plugin by hand: turn off the Redis object cache in the AccelerateWP interface of cPanel too, with the same switch, and the system removes the plugin as well. The Object Cache Pro offer shown in the plugin’s settings is a separately sold product; you don’t need it.

If the error message “Redis extension is not loaded for selected php version” appears below the switch, the redis PHP extension is not enabled in the website’s PHP version. Enable it on the Select PHP Version › Extensions tab (managing PHP extensions), then go back to AccelerateWP and turn on the feature.

Alongside AccelerateWP’s Redis object cache, don’t use another object cache (for example Object Cache Pro or the W3 Total Cache object cache), and the snuffleupagus PHP extension must not be enabled. If you later switch to another PHP version, check that the redis extension is enabled there too, as plugins are stored per version.

Deactivation

Disable AccelerateWP in cPanel, not among your WordPress plugins:

  • Hover your mouse over the AccelerateWP cell, click on the cog icon, and in the Features window, switch off the AccelerateWP toggle. The system will deactivate and remove the AccelerateWP plugin and cache; the website will continue to function in exactly the same way as it did before it was enabled.
  • If you enabled it based on advice, you can also undo it with the Rollback button under the Applied advice in the Advice window. In the Please specify the reason window that opens, you can write why the advice did not work out for you (this is optional), then click the Confirm button. After a few seconds, the advice returns to the Review status, the table shows Advice available again, and the system removes the AccelerateWP plugin.

The AccelerateWP Advice window, showing advice with the Applied status and the Rollback button

The Active label in the table shows the status of the advice. Whether the feature is currently enabled is shown by the toggle switch in the Features window, which opens via the cog icon.

Troubleshooting

  • The layout of the site broke after enabling, or a menu, slider or form stopped working. Turn off the setting you enabled last on the JavaScript & CSS or Media page (most often it is caused by delaying or combining JavaScript), save, and then clear the cache. If CSS minification is the cause, you can also add the faulty file to the Excluded CSS Files field.
  • The feature cannot be enabled; a red exclamation mark appears in the cell. Click on the exclamation mark: the window will identify the issue (for example, another caching plugin, an unsupported PHP version or a missing PHP extension) and provide a solution. If there is another caching plugin, disable and delete it from the WordPress Plugins page, then try again.
  • A page does not update for visitors (for example personalised content or a list updated from an external system): add its URL to the Never Cache URL(s) field on the Cache › Cache Rules page.
  • The site is still slow. The cache bypasses PHP and the database for visitors who are not logged in. If the slowness occurs for logged-in users, in the shopping basket or in the admin panel, the X-Ray App will show you which plugin or query is causing the delay. You can find further methods in the article on speeding up WordPress.

If the error persists, please contact us and provide the website address. The AccelerateWP log file on the hosting server is located at ~/.clwpos/main.log; if you know the time the error occurred, please include that as well.


Was this answer helpful?

« Back