+380 (44) 391 0955
Call me
24/7 email support
Live chat (10:00-19:00)

What should I do if the site takes a long time to load?

What should I do if the site takes a long time to load?

In this article, we’ll tell you what causes a slow website and what you can do about it. We will not consider in this article the poor quality of Internet connection, as today it is very rare cases and, as a rule, it will be slow for all sites, not just yours.

Reason 1: Wrong tariff plan.

Each hosting plan has its own limitations on resources on CPU and RAM, so the site may run slower on the minimum hosting plan than on the maximum. To check what load creates your site, you need to log in to the control panel hosting DirectAdmin, go to the section of resource consumption and there will be displayed graphs of the load created by your site.

What should I do if the site takes a long time to load?
What should I do if the site takes a long time to load?

What to do: change the tariff plan to a higher one – you can do this with us directly from your personal cabinet, and you do not pay anything extra, just change the end date of the service. You can also ask support for a few days to activate a higher rate for testing – to determine what memory and CPU limit you need.

Reason 2: Unoptimized scripts.

But not always the only solution is to change your plan to the biggest one. This is usually the easiest method if you don’t want to understand the script itself.
But it is possible to reduce the consumption of resources by scripts and thus save money when choosing a tariff plan.

As a rule, the main load creates requests from the php script to the database mysql and the more these requests in a single call to the script, the slower it will be processed. One request to the database is processed very quickly, a fraction of milliseconds, but what if you have an online store that does a search on the database with a selection of specific values, and the database contains a large number of records.

What to do: In this case, caching the data will help.

By enabling caching, you can significantly speed up the loading of your site for regular visitors. If you use a CMS such as WordPress, you can install a plugin such as W3 Total Cache or W3 Super Cache, either of which will allow you to enable site-wide caching or caching of specific site elements.

What should I do if the site takes a long time to load?

Reason 3: Site is running on an old version of PHP

If your site has not been updated for a long time, and it is still connected to PHP5.4 or 5.6, then the best option is to update the site engine to a version compatible with PHP7.

What to do: translate the site to PHP 7 is another way to speed up the site scripts.
The performance of PHP 7, compared to earlier versions, has increased considerably, becoming one of the most attractive features of this branch. We have a translation of a great article on our blog about testing the performance of PHP 7.3. Very briefly, on the most popular WordPress engine, PHP 7.3 makes almost three times as many queries per second as PHP 5.6

Therefore, it is recommended to check if your script is compatible with this version of PHP. Popular CMS like WordPress or Joomla already support this version of PHP.
It is sufficient to update these CMS to the latest stable version.

What should I do if the site takes a long time to load?

You can switch the PHP version directly in the Directadmin control panel under Tools –Select PHPversion.

Reason 4: Not using CDN

Another useful tool I would like to consider the service Cloudflare. Cloudflare provides CDN, caching proxy, and attack protection. All of this can also help speed up the site. Cloudflare has a UA-IX access point, which also contributes to the fast operation of the site directly and for users in Ukraine.
Cloudflare also has a free plan available, which allows you to use it without additional investment.

What should I do if the site takes a long time to load?

Another slow site may be due to style files or java-scripts or media files that are loaded from third-party resources.
To diagnose these files, we recommend using the “developer tools” in the Chrome web browser. In the Network section, you can see how long it takes to download such files.
We recommend that all java scripts are uploaded to the hosting server if possible, such as jquery and other similar frameworks. Even though they use a CDN, in some cases they can still cause a problem in loading the site.

Василий Полудень