• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
NameHero® Blog

NameHero® Blog

Web Hosting Tips & Resources From NameHero

  • Hosting
    • Web Hosting
    • WordPress Hosting
    • WooCommerce Hosting
    • Enterprise Hosting
  • VPS
    • VPS Hosting
    • Flex VPS
  • Reseller
  • Email
  • Gaming
  • Domains
  • Website Builder
  • Account
  • Blog Home
  • Categories
  • Authors

How To Improve Your Time To First Byte (TTFB) On WordPress

Ryan Gray

Published on: October 22, 2017

Categories: WordPress 0

Last week I was working with one of our customers on ways they could optimize their time to first byte (TTFB).

If you’re familiar with many of the webpage speed tests out there, you know this is one of the important benchmarks, as an indication of the responsiveness of a webserver or other network resource.

A lot of optimization that goes into TTFB is the back-end processing of the requested resource.

For example, a static webpage that isn’t being pulled from a database is going to have a faster TTFB than one such as WordPress where the content is being pulled out of mySQL.

WordPress Theme Optimizations

If your website is using WordPress then we have to first look at how well your web server is optimized for pulling this content out of the database.

I like to always encourage our customers to carefully select their WordPress theme and plugins as these can be two big factors into decreasing your TTFB. 

Unfortunately a lot of themes and plugins are coded out of convenience without keeping server performance in-mind.  WordPress developers nowadays are wanting to sell to the masses vs. creating a theme that’s optimize for high server performance.

I would estimate that the average WordPress theme customer, on say ThemeForest, doesn’t average more than a couple hundred visitors per month.

A lot of WordPress functions can also be completed without the use of a plugin.  Even though they can be extremely convenient, it’s best to use a few as plugins as possible for optimal performance.

WordPress Server Optimization

Once you’ve optimized your WordPress theme and plugins you need to take a look at the back-end configuration on your server.

The first thing I like to check is the PHP handler.  Since WordPress is obviously a PHP/mySQL application on the back-end, these are the first two points of optimization.

Optimizing PHP For WordPress

All of our Shared, Reseller, and VPS hosting packages allow for multiple versions of PHP.  I highly recommend using PHP 7.0+ on your WordPress website.  The performance and security advantages are tremendous and you’ll notice a substantial speed increase over PHP 5.6.

Once that has been selected, you need to take a look at the PHP handler.  All of our Shared and Reseller hosting package utilize the lsphp handler, a byproduct of the LiteSpeed web server, which means it has already been optimized for you.

If you’re using our VPS hosting, you need to decide the best handler for your website.  If you don’t want to spend the extra money on a LiteSpeed license, I recommend enabling PHP-FPM (FastCGI Process Manager).

PHP-FPM is now installed by default on all new Virtual Private Servers, you just need to actually login to Web Host Manger and enable it on your websites (I’ll demonstrate in the video below).

Optimizing mySQL For WordPress

Our Shared, Reseller, and VPS hosting packages all default with MariaDB.

MariaDB is a community-developed fork of the MySQL relational database management system intended to remain free under the GNU GPL.  Some of the original mySQL developers started MariaDB after expressing concern once Oracle acquired mySQL.

Therefore it works the exact same as mySQL (your scripts will still function the same) but with much better performance and redundancy.

If you’re using one of our older virtual private servers, you may want to go to MariaDB upgrade in Web Host Manager and upgrade.  However if you’re on one of our newer packages, it’s already installed by default.

Optimize Your my.cnf For WordPress

While installing MariaDB will help with performance, you still need to optimize your my.cnf file, as not all servers are alike.

Unfortunately for those on our Shared and Reseller hosting, you’re not able to optimize this file as we’ve already done it server-wide.

While we have optimized it for performance, we always have to remember these are Shared servers meaning we have to pick and optimization that works for the masses vs. individual websites.

Simply put, you’re going to have better WordPress performance on a VPS that you can customize.

With all of that said, the main point of optimization inside the my.cnf file is the innodb_buffer_pool_size.

[From mySQL documentation] InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory. Knowing how the InnoDB buffer pool works, and taking advantage of it to keep frequently accessed data in memory, is an important aspect of MySQL tuning. For information about how the InnoDB buffer pool works, see InnoDB Buffer Pool LRU Algorithm.

The more RAM you have in your server you can allocate to the innodb_buffer_pool, the better the performance.  As a general rule of thumb, many database administrators have recommended 80% of RAM in the server.

Percona has a fantastic article on their blog explaining this in detail as well as providing this handy chart:

Total Server RAM Buffer pool with 80% rule Remaining RAM
1G 800MB 200MB
16G 13G 3G
32G 26G 6G
64G 51G 13G
128G 102G 26G
256G 205G 51G
512G 409G 103G
1024G 819G 205G

Personally, I’m always a bit more on the conservative side of things, and don’t go quite to 50%, but this is all personal preference.  Especially if you’re running Web Host Manager/cPanel on your server you must also take that into consideration and allow enough RAM for it to operate smoothly.

Step By Step WordPress Server Optimization

To help put this all together, I thought it would be helpful to do a video tutorial where I installed a default copy of WordPress on a standard server and then compared the speed using the above optimizations:

As you can see, these very simple optimizations took my TTFB down to well under 400ms which is incredibly fast. I tested using the default WordPress theme without any plugins as I knew it doesn’t make unnecessary PHP/database calls.

There are still additional optimizations that can be made by adding caching, a content delivery network (CDN), etc. but I’ll cover those in another post.

I’m also going to be including all of this in my upcoming VPS Hosting 101 course in our new training center.

Ryan Gray

Ryan Gray is the founder and CEO of NameHero, one of the fastest growing independent web hosts in the United States. Ryan has been working online since 1998 and has over two-decades experience in Internet Entrepreneurship.

Related Posts

Is WordPress Good for Small Businesses?

Let's dive deeper into the reasons for choosing WordPress for your small business website and the quickest way to launch a WordPress site!

Custom WordPress Development: Do You Need It?

Let's discuss the benefits and drawbacks of custom development projects, and when to hire a WordPress developer.

Why Is WordPress Down? 5 Possible Reasons

Let's go over five reasons that can cause your WordPress website to go down. For each we’ll show you how to fix it and prevent it!

Substack vs. WordPress: Choosing the Right Platform For Your Writing

Let's explore everything you need to know to decide between Substack vs. WordPress - their advantages, intricacies, and, a few drawbacks. 

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Follow & Subscribe

Exclusive promos, content and more!


Most Popular Posts

NameHero’s Recommended WordPress Plugin and Theme Setup (2024)

WordPress Hosting vs. Web Hosting – What’s The Difference?

How To Increase The InnoDB Buffer Pool Size

How To Fix A Stuck All-in-One WP Migration Import

How To Add A Subdomain In Cloudflare

Top Categories

  • WordPress
  • WordPress Tutorials
  • Enterprise Hosting
  • WooCommerce
  • Web Hosting
  • Resellers
  • Website Security
  • Website Development
  • Website Performance
  • VPS Hosting
  • SEO Tips
  • Announcements
  • Domain Registration
NameHero

NameHero® proudly provides web hosting to over 40,000 customers with 99.9% uptime to over 750,000 websites.

  • Master Card
  • Visa
  • American Express
  • Discover
  • Paypal
Products
  • Web Hosting
  • VPS Hosting
  • Flex VPS Hosting
  • WordPress Hosting
  • WooCommerce Hosting
  • Reseller Hosting
  • Enterprise Hosting
  • Email Hosting
  • Game Hosting
  • Domains
  • Website Builder
Help & Support
  • NameHero Blog
  • NameHero Gaming Blog
  • Support
  • Help Center
  • Migrations
  • Affiliates
  • Gaming Affiliates
  • Call 1-855-984-6263
Company
  • About Us
  • Contact Sales
  • Reviews
  • Uptime
  • We're Hiring

Copyright © 2025 Name Hero, LLC. All rights reserved.
NameHero® is a registered trademark.

  • Privacy Policy
  • Terms of Use
  • Acceptable Use Policy
  • Payment Policy
  • DMCA