10 steps to speed up WordPress and master it like nobody else

WordPress speed up

Today WordPress is becoming the CMS, content management system, par excellence. Even the White House has replaced Drupal with WordPress, as one of the surprises at the end of the year of 2017. And is that WordPress is a very easy-to-use CMS that uses a large community, apart from a good number of plugins to get more out of it.

That is why we will teach you the ten steps to master WordPress Totally and so you can have that blog, that landing page for your business or that eCommerce, in order to sell some items that in these parts are not easily found, in the best possible state. A WordPress that can be used both from your own website, as well as downloading it to set up a website from your own hosting.

First: accommodation

It is the most important, since if your website is hosted on a slow host, you will find serious problems to raise the Google Insights score (one of the important factors for organic natural positioning or SEO).

We can test performance from this tool that uses 14 different locations to find the velocity: keycdn.com

Performance

The normal thing is that we find the speed between 200-400 milliseconds. We must appreciate the different speeds depending on the location in which the tests are done. If we are going to look for a Spanish audience, we have to care about London. On the other hand, if we want to sell products between Europe and America, we have to look at those locations.

It would be important run tests throughout the day to find the average score so that we can start from more accurate data collected.

Second: the peculiarities of hosting

php

We have to make sure that the hosting, in which we have the web hosted, use the latest components, at least the versions, so that everything goes fast as silk:

  • PHP 7.x: it is quite a significant increase when compared to version 5.6 of PHP. If for whatever the hosting does not offer it, it would be important to go looking at someone else. This also happens with the plugin or theme that we are using for WordPress, since anyone who boasts of continuing to be developed, must be compatible with any of the latest versions of PHP.
  • webserver: Apache is for light and basic use. Things change a lot when the server has to support heavy loads, so we have to look at providers that use Litespeed or Nginx.
  • OpCode Caching- Increases 30 to 40 percent in PHP performance. The funny thing is that there are not many hosts that use OpCode. This is because it reduces the number of people who can log into a server for each account. If you want to know if your hosting offers it, drop that script on your website through FileZilla: github.com/amnuts/opcache-gui
  • Caching- Caching plugins work quite well, but they can cause strange behavior if there is a lot of traffic going through the web. Ideally, find a host that uses real caching from the server level. There are two: Litespeed Lscache and Varnish.

Third: use Google Analytics

wordfence

Some may use Wordfence as a website security measure, but it causes a loss of performance. We have in our hand a great server that comes to our aid: Google Analytics. The reason not to use Wordfence is because real-time traffic logging makes a huge impact on website performance. If we need to make use of that data, Analytics is the answer.

Fourth: skip the visual page builders

When are we going to development of a website that will suffer a high traffic load, we have to move on from those issues that will count badly for web speed measurement tools such as Google or PingDom. Some like Visual Composer are heavy and will slow down the web.

Compose

One of the most important tips is go to child themes such as Genesis or Thesis to start developing the web on our own. It will take more work on our part, but we will benefit from it in the long run.

An alternative that we can have before these heavy issues, is WP Blockade, which is responsible for launching the page in plain html, thus eliminating the overload process that is often the culprit for web overload.

Fifth: plugins

Plugins

The plugins are one of the quintessential WordPress, but it is advisable to use as few as possible. Even if we have them disabled, we have to delete them. We can use Google to do some research on that plugin and thus find out if it really benefits us.

Sixth: Bots and Crawlers

We can use these lines of text in robots.txt:

User-agent: * 
Crawl delay: 10

What will we get? That those called as "crawlers" obey those two parameters and Wordfence takes care of the rest. Let's say we'll keep them at bay.

Seventh: remove xmlrpc.php

We are facing a of the sources of the most aggressive attacks on WordPress. Since most people don't need it, it can be removed. Of course, pay attention to these lines since we are facing a file that is used by the popular Jetpack for SEO. If you use this tool, go to the next point. It may also be clear that if Jetpack uses that file ...

jetpack

Eighth: deactivate or decrease heartbeat

It will depend on whether our website uses heartbeat to disable it. Heartbeat causes all kinds of performance problems and its deactivation is highly recommended. One of its uses is due to the long periods of time in which we leave the WordPress desktop open, precisely when we are writing or editing a publication. Continual requests can cause excessive use of resources.

With this plugin we can deactivate it or reduce its use: heartbeat-control.

We can also add these lines to functions.php depending on what we want to do:

add_action ('init', 'stop_heartbeat', 1);
function stop_heartbeat () {
wp_deregister_script ('heartbeat');
}

heartbeat

If we want there to be a time interval for heartbeat to act:

add_filter ('heartbeat_settings', 'heartbeat_frequency');
function heartbeat_frequency ($ settings) {$ settings ['interval'] = 60; // or the time interval in seconds that we want $ settings;
}

Some more information about heartbeat

Deactivating heartbeat should not be done until it is actually known what is the real cause of excessive CPU usage. We can do this through these steps:

  • Check your access-logs if there are a good amount of POST calls /wp-admin/admin-ajax.php and the timestamps match a high CPU usage spike.
  • If the hosting uses cPanel and CloudLinux, surely we can take a log of when that peak of resource use occurred. We can know the cause that will be listed in admin-ajax.php.
  • If you have root access it can be monitored with "top -c". We can save time in monitoring by using: top -c -u username -b> topout.txt
  • You can follow the access_logs Real-time user count and helpful: tail -f ~ username / access-logs / domain.com

Ninth: disable WordPress Cron

cron

The reason to disable WordPress Cron is that no need to have it active for all those times when someone saw our website. Let's disable it and set a system cron. To do this add in wp-.config:

define ('DISABLE_WP_CRON', true);

Now we can put in the control panel a cron system with the command:

/usr/local/bin/php/home/user/public_html/wp-cron.php

We can leave it to run every 10-20 minutes.

Tenth: records

logs

If we want to know what happens to our website, we need access the event or log log. They are really helpful in diagnosing performance and jitter issues. If we do not know where they are, we can ask the hosting. The ideal is to learn to interpret them, although it will take time.

The two main logs are error logs and access_logs. Read them and practice the art of Google search to learn more about them. Little by little it will be something more familiar and that will come from fear to deal with these performance problems and instability of the web.

If you already want to give your website a better visual appearance, here.


Leave a Comment

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

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.