Congratulations on your decision to move or set up your WordPress site on Servebolt. Our performance specialists have a set of standard tasks when setting up or moving a site to Servebolt. These tasks are not secret, nor complicated. Follow this to-do list to make sure your WordPress is as fast as possible with Servebolt hosting.

1. Remove unused and unnecessary plugins

We start by removing plugins that are no longer necessary when running our hosting. The most common plugins we remove are caching plugins, optimization plugins, and security plugins.

Caching plugins

Caching plugins is not something you should use for performance. Read about how caching works in WordPress.

We start by removing all caching plugins:

  • W3 Total Cache
  • WP Super Cache
  • WP Rocket

These plugins often make their own folders, so be sure to remove folders and files like

/wp-content/w3tc-config
/wp-content/cache
/wp-content/object-cache.php
/wp-content/advanced-cache.php

Optimization plugins

Optimization should be done in the code, and not by some kind of parser that runs in PHP. This will slow down your site.

Remove these plugins:

  • Autoptimize
  • WP Rocket

Security plugins

WordPress security is not something you can add as a plugin. Security plugins are a false security. The way to handle WordPress security is to keep everything updated and make strong, unique and long passwords. An external WAF(Web application firewall) is the way to go if you want enhanced security. We prefer Cloudflare, and we're also a Cloudflare Optimized Partner.

We remove all security plugins from WordPress:

  • WordFence
  • iThemes Security
  • All In One WP Security & Firewall

Other plugins

Plugins you don't need or use should not only be deactivated but completely removed.

2. Make a new .htaccess

Most of the plugins above do edits to the .htaccess, and some make the .htaccess way to large. To keep .htaccess clean, and small is a very good idea for performance. 

Single site WordPress

#Begin WordPress
  <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
  </IfModule>
#End WordPress

Multisite WordPress

Subfolder

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
#add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

Subdomain

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
#add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]


What about redirects? Well, if you have a few redirects then doing them in .htaccess is fine. If you have a lot of redirects then using a plugin like Redirection is a good idea. Then the redirects are done in PHP and kept in the database and are easier to maintain.

3. Optimize the database

Add indexes

Think of indexes like the index of an encyclopedia. With an index of where you can find each topic the information you want is much easier to find. Without an index, you have to search thru the whole book, which takes time.

Use our plugin

Our plugin Servebolt Optimizer does a lot of good things to the performance of WordPress sites, including adding indexes to the right database tables.

Add indexes yourself

All options within WordPress are stored in the _options table. In many WordPress sites, the _options table can become quite huge, and all options with AUTOLOAD loads automatically when WordPress is loaded. Loading all options with AUTOLOAD is a good thing, but if there is a lot of options to autoload then that query can become quite heavy to run. Adding an index to the AUTOLOAD column will make it much faster.

Run this SQL to add a index to the autoload column:
ALTER TABLE wp_options ADD INDEX("autoload"); 

If you have a WooCommerce store, use ACF, or have any other plugins that add a lot of stuff to the _postmeta table then the same plugins probably does a lot of selects on meta value queries too. Those can be quite resource heavy to do. Adding an index to the meta_value column will help since indexes make it easier for the database to find the right values.

Run this SQL to add a index to the meta_value column:

ALTER TABLE wp_postmeta ADD INDEX "sbmv" ("meta_value"(15));

Did this answer your question?