WordPress website is slow, why bother?

Hi guys, it’s been a while since I wrote a new post on the blog because the work is a bit too much as well as updating the old post takes a lot of time. However, in the past time, according to me observing and recording customer comments at AZDIGI, I see many cases where WordPress websites load very slowly despite the very high server/hosting configuration, so it’s not optimized. be performance.

So in this article, I will talk in detail about some causes of slow loading WordPress website using all my experience so that you can optimize your website better yourself.

Causes of slow loading WordPress website

Hosting/Server Configuration

This is probably the first reason why a WordPress website loads slowly. On the server side, there are 2 main reasons:

Configuration is not enough

We all have to understand that each website will have the ability to use different server resources. Assuming your website is required to use more resources than usual (sales website, or websites that use a lot of complex features) then you will now need a higher Hosting/Server configuration. Normally, all features on the website are handled smoothly, because usually the website will load the processes in order, as long as one of the loading processes is slow, the loading time of the whole website will be slow.

WordPress website is slow, why bother?  20

For Shared Hosting using cPanel, one way to know if the configuration is not enough for the website is to go to cPanel and see the CPU/Physical Memory statistics on the right column. If you see it showing a warm or red color like this, your website has used too many resources.

WordPress website is slow, why bother?  21

You can also go to the CPU and Concurrent Connection Usage section to see a history of times your host plan has exceeded resources.

WordPress website is slow, why bother?  22

WordPress website is slow, why bother?  20

As for use VPS or a private server where you have access to the server’s SSH, you can use the command top -c to see the CPU status as well as the processes occupying the CPU:

See more:  Working with Git on WordPress via WP Pusher

WordPress website is slow, why bother?  24

Because each website has different loading conditions, I can’t advise the exact configuration you need. So you can read all of this article and do all the ways below, but the website still needs a lot of resources to handle, then upgrade the service to a higher package.

Error from server

Although it is quite unlikely to happen, this is still a cause of sudden and unexplained website slowness. Usually with a Shared Hosting server, you can go to cPanel => Server Information to see if the load status of the server is overloaded, or maybe there is something wrong with the provider.

WordPress website is slow, why bother?  20

Usually, if there is a problem from the server side, the Time To First Bytes (TTFB) time when the page loads will be very high (about more than 5 seconds if using the service of a domestic provider, but when the cable breaks, it’s not. will be the same). To see the TTFB time when the page loads, you can open the Google Chrome browser and then visit your website, then right-click the page and select Inspect and then find the longest loading link to see the TTFB as shown in the image below. .

WordPress website is slow, why bother?  26

Slow loading from external links

If the website uses a lot of external links such as Facebook embed code, Tawk.to, PushCrew, etc., it is also a cause of website slowness because if the network speed of people accessing these links is slow, it will also increase. your website’s load time. Therefore, it is advisable to limit the use of embed codes of external services, only use them with really necessary services or embed them separately in an appropriate page.

Some ways to fix slow loading WordPress website

Limit the use of many plugins

Each plugin when installed on the website, the resource consumption will increase more or less depending on the plugin type, so you should limit the use of plugins that are not really needed or are not used. In particular, there are some plugins that you should consider using such as:

WordPress website is slow, why bother?  20
  • Google XML Sitemaps: Sitemap you can use Yoast SEO plugin to install without needing a separate plugin for it. Because when the sitemap updates, if your number of pages is large, the server will need quite a lot of resources to update the sitemap file.
  • Security Plugins: WordPress security is complicated but also simple, so you don’t need to use many different security plugins, but should only use a single plugin. The plugin I recommend to use is iThemes Security because it has all the necessary features to secure a WordPress website.
  • The plugin automatically links to the keyword in the article: Some users want to increase the number of internal links in the website, so they use plugins that automatically link keywords in articles to tags, categories or articles. This is not necessary because overusing these plugins will make your article full of links very unsightly, you can do this manually or using a plugin Internal Link Manager to automatically link only the keywords you want to the specified page.
See more:  [Woocommerce] Add a simple product

Use cache on the website

Every website should have a cache, there are many different caching techniques for WordPress, but each website should have HTML Cache to minimize the server using a lot of resources to process. If you are not very technical, you can use the WP Super Cache plugin or LiteSpeed ​​Cache (with hosts that support LSCache like AZDIGI) to create a cache for the website, so your website has saved a decent amount of resources already.

Compress images before uploading to the website

This error is very common with some users, that is, uploading an unoptimized original image weighing tens of MB to the website. This means that when a user loads the page, their browser will load dozens of MB of images excluding other elements, taking 5 seconds to be less.

For regular websites that do not need precise pixel-by-pixel definition of the image, the size should only be reduced to a maximum of 1100px for the width. You can also install additional plugins Smush Image Optimization, Compression, and Lazy Load to support automatic image compression when uploading to the website to help reduce the image file size to the lowest level while keeping the quality.

Reduce the frequency of running WP Cron

Every WordPress website has its own cronjobs that are built straight into the source code to do some repetitive things like checking for new versions, deleting comments in the trash, or some feature that a plugin/ themes are available.

WordPress website is slow, why bother?  20

One feature of the resource intensive WP Cron is that the wp-cron.php file is always running with high CPU usage, which you can only view when viewing with the command. top in the Linux server.

See more:  [Woocommerce] How to use Storefront theme

WordPress website is slow, why bother?  29

To see all the cron present in your WordPress site you can use the plugin WP Control. Then if you find that there are only unnecessary crons in this, you can turn off WP Cron by inserting this line into the wp-config.php file:

define(‘DISABLE_WP_CRON’, true);

Then create a cronjob in Hosting/Server that runs periodically 2 times a day as follows:

WordPress website is slow, why bother?  20
* */12 * * * /usr/bin/php /home/path/public_html/wp-cron.php  >/dev/null 2>&1

The file admin-ajax.php uses a lot of CPU

In addition to wp-cron.php, there is another file that is equally CPU hungry, which is the file /wp-admin/admin-ajax.php. Usually this file will work a lot when you use WooCommerce or plugins that use WordPress’ Heartbeat API. If you see your admin-ajax.php file processing constantly, it’s time to take control of how often this file works.

The easiest way is to use a plugin Heartbeat Control to disable the Heartbeat API if you think your website doesn’t need it, or reduce the frequency of this file.

Clean up the database, especially the wp_options . table

Those who are programmers are certainly no stranger to all the data of the table wp_option in WordPress will load out one time each time the website loads. This means that if you check the database and find this table has a large capacity, it should be reviewed and optimized. I wrote a pretty detailed post about this here.

Use PHP version 7 or higher

PHP versions older than 7.2 will be dead until November 2019, meaning there will be no updated versions or support from PHP. Therefore, you should use PHP 7.2 version for your website right now partly because of security, the most important part is that PHP 7.2 has a processing speed many times faster than PHP 5.6 and below versions, if you can use PHP 7.3 version the better.

WordPress website is slow, why bother?  20

Refer: How to upgrade to PHP 7 using Shared Hosting using cPanel

Epilogue

The above are just some simple ways that anyone can do by themselves to optimize their website to make it faster from saving resources for the server. With some other advanced ways I will mention in another article in more detail. In addition to this article, I also have some other articles related to website acceleration for WordPress that you can refer to below.

Refer:


Source: WordPress website is slow, why bother?
– TechtipsnReview

, , ,

Leave a Reply

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