Applicable to:
- cPanel & WHM
Question
What basic steps can be taken to improve the performance of a WordPress site in cPanel & WHM?
Answer
Note: cPanel Technical Support is unable to assist with WordPress site optimization. For further assistance, contact a Qualified System Administrator.
Keep WordPress updated
Outdated WordPress core, themes, and plugins can introduce bugs and security vulnerabilities. Use WP Toolkit to configure automatic updates for core, plugins, and themes without manually editing configuration files:
- In cPanel, open WP Toolkit.
- Find the site and click Autoupdate settings.
- Configure the desired update behavior for WordPress core, plugins, and themes.
- Click OK.
For more information, see How do I enable automatic updates for my WordPress install.
Audit installed plugins
Unused plugins are a security risk — unpatched plugin code on disk can be exploited even when the plugin is deactivated. Previously active plugins can also leave behind autoload data in the database that WordPress reads on every page request. Use WP Toolkit to review and remove plugins that are not actively in use:
- In cPanel, open WP Toolkit.
- Find the site and click Plugins.
- Review the list and remove any plugins that are not actively in use.
Empty the WordPress trash
Deleted posts, pages, and comments are stored in a trash system rather than removed from the database immediately, adding unnecessary rows over time. Review and empty the trash from the following locations in wp-admin:
- Posts > Trash
- Pages > Trash
- The Comments page (spam and trashed comments)
To automatically delete trash items after a set number of days, back up wp-config.php before editing:
Note: Replace username with the cPanel account username.
# cp -a /home/username/public_html/wp-config.php /home/username/public_html/wp-config.php.bak
Then add the following to wp-config.php. Replace 7 with the desired number of days:
CONFIG_TEXT: define ('EMPTY_TRASH_DAYS', 7);
To bypass the trash and remove deleted items from the database immediately:
CONFIG_TEXT: define ('EMPTY_TRASH_DAYS', 0);
Enable Gzip compression
Gzip compression reduces the size of responses sent to browsers, which can improve page load times. For steps to enable it, see How to enable gzip compression.
Install a caching plugin
A caching plugin reduces page load times by serving pre-generated pages rather than rebuilding each page on every request. In wp-admin, navigate to Plugins > Add New to install a caching plugin.
Common options:
- WP Super Cache: recommended for most users; simpler to configure with fewer settings to manage.
- W3 Total Cache: a more advanced option with CDN support and additional performance features. Misconfiguration can reduce performance; this plugin is better suited to advanced users.
Note: Some caching plugins also provide Gzip compression and browser caching options, which may overlap with the Gzip step above.
Disable trackbacks and pingbacks
Pingback and trackback notifications from other sites consume server and database resources. Unless required, disable them in wp-admin at Settings > Discussion by unchecking Allow link notifications from other blogs (pingbacks and trackbacks) on new posts.
For additional WordPress optimization steps, see Advanced WordPress Optimization Steps.
Comments
0 comments
Article is closed for comments.