I setup a cPanel install from the marketplace using CentOS 7.6 on a $20 droplet (4 GB, 2 vCPUs). Currently seeing extremely high TTFB on all of my wordpress installs compared to my $5 wordpress droplets.

$5 droplets I’m seeing 100-300ms TTFB, my cPanel sites even with server load under 0.1 I’m getting 500-3400ms TTFB (Yes, 3.4 seconds). The cPanel admin pages are fast, but all wordpress content is slow (frontend and admin backend).

I’m running PHP 7.4 with Apache, gzip, caching, etc. I’ve followed every performance guide I can find, but I need the sites to be more performant. I’m seeing slowness on sites with dozens of plugins and slowness on brand new fresh wordpress installs.

There has to be some cPanel or apache config that is setup differently for the marketplace install vs the Wordpress marketplace install and I really need guidance on where to look.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

FOUND THE PROBLEM! PHP-FPM is NOT enabled by default from the Digital Ocean cPanel marketplace install. (Digital Ocean support, you need to fix this immediately). I enabled that and all the sites are now blazing fast as I expect on my droplets.

To save you a google search, follow these steps:
1) Open WHM
2) Navigate to MultiPHP Manager
3a) Run a GTMetrix report against your site
3b) Set PHP-FPM status to ON and then click the convert all accounts to PHP-FPM option
4) Run another GTMetrix report against your site and smile
5) While you’re on this screen, make sure you have PHP 7.4 set as your default, or whatever the latest PHP version is when you’re reading this

  • Hello, @corvetteaustin2

    I believe that by default PHP-FPM is not enabled for your sites on cPanel/WHM. It comes really handy when you have a lot of traffic towards your server or general traffic spikes.

    You can also make sure you’re using the mod mpmevent or the mpmworker

    The MPM Event serves a single HTTP request across multiple threads. However, the MPM Event uses a dedication system and dedicates a thread to handle all live connections. The system allocates a request to the child threads only when it receives a request. This allows the threads instant availability after the request finishes.

    The MPM Worker causes Apache to fork into several processes so that a single crash does not kill the entire Apache process. Each forked process creates numerous threads, and a listener thread that listens for connections. This enables the system to serve multiple requests concurrently.

    Hope that this helps!

    Regards,
    Alex

    • Hi @alexdo , I think it would be good to include some of this information in the cPanel marketplace documentation under a “performance considerations” section. Since the majority of my sites are going to be Wordpress (and so are other people’s websites), I’m not even kidding when I say this: PHP-FPM made my wordpress sites load 7x faster than the default suPHP.

      TTFBs were consistently 900ms-3500ms before the change. From my reading, suPHP isn’t even in development anymore and PHP-FPM is, so that should also be another consideration. Thanks for the information you provided as well.

      • Hello, @corvetteaustin2

        Using the suPHP PHP handler is among the most flexible and secure ways of serving PHP requests. With the suPHP handler selected along with using the suEXEC option, all PHP scripts will be executed as the user that owns the script, instead of running as Apache’s “nobody” user.

        The main benefit of using the suPHP handler is that it isolates one user on the server from the others. So if one account was compromised because of an exploit in one of your PHP scripts, the attacker would only be able to view or modify files owned by that particular user. It’s also among the easiest to use with CMS (Content Management Systems) such as Wordpress or Joomla. As typically these applications require the ability to create files on the server, and being that all of your files are owned by just one user, permission management is easy to configure. The main disadvantage of using the suPHP handler is that your PHP websites could be slower due to the additional overhead of having to run a separate PHP process per request.

        Regards,
        Alex

Submit an Answer