Knowledge Base

VPS & Dedicated Hosting: Site Performance Essentials & Tips


This article will explain how-to prevent your server from freezing up, including ways to fix common site performance problems on a VPS or Dedicated Server.

Before you start, measure your site's current speed at Google PageSpeed Insights; just take note of the provided 'Seconds to load'.

Write down the original time.

  1. Tune your CMS site (WordPress, Joomla, etc.)
    1. Temporarily deactivate ALL Plugins/Modules/Addons.
    2. Retime your site once more at Google PageSpeed Insights.
    3. Write it down.
    4. Install a Plugin/Module/Addon that does "caching":

      Examples: On WordPress, there's W3 Total Cache or WP Fastest Cache. W3TC is our top recommendation. (Several caching plugins usually have conflict or compatibility issues with other plugins. Some users are forced to search for replacement plugins just to make their site function efficiently, but from the reviews of active users, all of the other well-programmed plugins they use work together perfectly with W3TC.)

    5. Reactivate one of the other plugins/modules. Retime it with Google PageSpeed Insights and write it down.
    6. Disable that previous plugin/module and then enable the next one. Retime it with Google PageSpeed Insightsr and write it down.
    7. Keep on doing that to determine which plugin is causing slowness to your site's performance. You'll usually find one that takes significantly more time than the others. In rare cases, it's a combination of two. Then find a replacement plugin/module that isn't so resource-intensive as the faulty one.
    8. On WordPress, do the same series of time measurements with any Widgets.
  2. PHP FastCGI(fcgi) Handler
    1. Login to your WHM.

      You may also follow this format (https://server.YOURDOMAIN:2087) 
      Make sure to replace YOURDOMAIN with the correct domain name on your account.

    2. Go to Configure PHP & Suexec (You can also use the search box at the upper left of WHM).
    3. Then change the "Handler" to "fcgi" and click the submit button.
  3. Use a CDN (Content Delivery Network)

    Cloudflare is our recommended CDN. To know more about Cloudflare, click here. It's free for all http:// sites.

    Note: if you use https:// anywhere on the website, you have to buy a paid version of CloudFlare.

  4. Once activated, time it once more at Google PageSpeed Insights.

Unsupported Suggestions

Please understand that the recommendations below are outside the scope of our support. If you have further questions about them, you'll need to do your personal research online.

We will continue to help by pointing you in the right direction; by giving you the many pieces of information that we have found to be helpful. Additionally, some of the further resources online amongst many are forums.cpanel.netdev.mysql.com/doc/, and httpd.apache.org.

  1. Use a PHP cache module such as Xcache or eAccelerator

    You may want to research them before trying it out:

    Important: Please note that we do not provide technical support for either of these.

    Try this at a time when you can most afford for your website to be down, just in case you'll run into a problem.

    1. Via your WHM, search for EasyApache and select it.
    2. Give it time to load up.
    3. At the bottom of the Step 1 page, click "Start customizing based on profile."
    4. On Steps 2 and 3, click "Next Step." You don't have to do anything else other than click "Next Step" on each.
    5. On Step 4, Short Options -> tick the checkbox for the one that you want -- for example, "Xcache for PHP" -> scroll down, and click Save & Build.

      This process can take 30 minutes or more to run. Use only 1 at a time. Time which one is faster for you. If it breaks your site, just go back to WHM -> EasyApache -> and rebuild without it -- uncheck it, and then rebuild it once more.

  2. After it's turned on, time it at again at Google PageSpeed Insights.
  3. Tune the MySQL database server settings in /etc/my.cnf. You can edit this file via SFTP using any SFTP program, like Filezilla (Username root and port 22).

    Some places to learn about my.cnf optimization are:

  4. Time your site again at Google PageSpeed Insights.
  5. Tune the Apache webserver.
    • One idea is using ApacheBuddy
    • Try the various MPM modules listed in Easy Apache -> Exhaustive Options. There are "More Info" links next to each module.
    • Load test your site using Siege or ab - Apache HTTP server benchmarking tool. Load testing will help you discover how many connections you can handle.
  6. Time it again.
  7. Buy additional RAM or CPU cores.

    You can purchase additional CPU and RAM via the Addons -> Add Resources tab (at the top of your Control Panel.)

P.S. How do you check what happened in the past?

Check the website and server logs:

The following two logs can be downloaded from the Access Logs section of your Control Panel.

  • /usr/local/apache/domlogs/YOURDOMAIN.COM
  • /usr/local/apache/logs/error_log

The last log can be downloaded with an SFTP program, like Filezilla, using the username of root and port 22.

  • /var/log/messages

Also, the `sar` shell command is good for history.

This command can be run via SSH from your main cPanel username or as root.

Examplesar -q for today and sar -q /var/log/sa/sa24 if you want to see the 24th day of the month. Edit it in whatever number is yesterday if you want to the ones from yesterday.

sar -r is also good for looking at RAM usage history.

P.P.S. Search what others have done

You can see what others are doing to optimize their servers at cPanel forums: Optimization.

cPanel forums: Troubleshooting high server loads on Linux servers is only one of many examples that can be found on the Optimization forum.

If you need further assistance, feel free to contact us via Chat or Phone:

  • Chat Support - While on our website, you should see a CHAT bubble in the bottom right-hand corner of the page. Click anywhere on the bubble to begin a chat session.
  • Phone Support -
    • US: 888-401-4678
    • International: +1 801-765-9400

You may also refer to our Knowledge Base articles to help answer common questions and guide you through various setup, configuration, and troubleshooting steps.

Did you find this article helpful?

* Your feedback is too short