Excellent Hosting Service
This is probably the most important, but you need an excellent hosting service. You might be happy spending 2$ or 5$ per month into it, however, do you have to spend 10 hours per month on backups (or even paying for it), making it faster, and fixing issues after a major crash or hack? If your value your time, then it’s probably better spending 25-30$ per month.
Last but not least, avoid using a VPS if you don’t have an engineer to help you on optimizing it.
Check this: Best Hosting Services for WordPress.
Recent version of PHP
If your server is not using PHP 7 yet, ask for it. It will improve the performance drastically.
Restrict the number of plugins
The plugins installed on your WordPress have a huge performance impact. It is by far what slows down your install the most.
Even the plugins supposed to make your WordPress faster might make it slower. The best examples are caching plugins, or optimization plugins. They indeed might accelerate the browsing of your website through caching, but they will slow down your install otherwise, and the WordPress administration.
Use the minimum number of plugins possible. If a plugin has many options, and many features, avoid using it, and try to use a plugin which has only the feature you need. If it doesn’t exist, maybe you should try to forget about that feature? Does it really matter to you?
Optimize your Empty Request Time
This term doesn’t exist, I actually made it up :) But basically, each time you load your website, the WordPress admin, or run a request to perform an action (asynchronously or not), the whole WordPress framework will be loaded. And with it, all the active plugins, which then might themselves run processes (update the database, run tasks, etc). The time it takes to load will therefore be added in front of any task you do. For example, listing the Posts in your WordPress will take the Empty Request Time + the Posts Listing Time.
Your goal is to limit this time to the minimum. If it is more than 2,000 ms, that will cause issues, you will easily get timeouts for instance. Ideally, it should be less than 500 ms.
If you install any plugin from Meow Apps, visit the Dashboard, and you will find this screen. It runs automatically every 5 seconds and calculate the new average every time.
This idea would be to let this run, check your score, disable one plugin, click Reset and wait for your new score, and by doing this, you might find which plugins (or options) are really slowing down your WordPress.
Optimize the database
Optimizing the database is very straightforward, it’s done by deleting the revisions, the drafts, and all that. You can use a plugin for that, but it’s not really needed, as it’s really simple. There is a nice article about all this here, and most of the content be below comes from it. Here it is.
Delete all the revisions with this SQL request:
DELETE a,b,c FROM wp_posts a LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id) LEFT JOIN wp_postmeta c ON (a.ID = c.post_id) WHERE a.post_type = 'revision';
Delete the auto-drafts:
DELETE FROM wp_posts WHERE post_status = 'auto-draft';
Optimize the WordPress tables:
OPTIMIZE TABLE `wp_commentmeta`, `wp_comments`, `wp_links`, `wp_options`, `wp_postmeta`, `wp_posts`, `wp_terms`, `wp_term_relationships`, `wp_term_tax
Disable the revisions and the auto-drafts by adding the following lines in the wp-config.php (not necessary):
define('WP_POST_REVISIONS', false ); define('AUTOSAVE_INTERVAL', 259200 );
Then, you can use Media Cleaner to remove all the useless Media entries you have. Even the free version does this! :)
Before cleaning your WordPress, make sure you have a backup for it. I recommend you BlogVault if you don’t have any yet.
Use the plugin WP Maintenance Mode to enable the maintenance mode. This will serve a static page to everyone, except administrators.
Clean Media Cleaner
Run the plugin Media Cleaner to locate and erase the orphan files, broken media, and files you do not need. The Pro will definitely help you to remove the useless files from the filesystem as well.
Disable Maintenance Mode
Disable the maintenance mode.
Test your WordPress install
Test everything in incognito mode or in a new browser (so nothing is cached). Double test everything with another computer.