DMT Web Hosting is too concerned about the health and safety of both clients and employees. Our office is closed due to COVID-19 countrywide lock down. You can reach us on +92 300 044 4656, +92 321 112 6660 during the lock down period. We appreciate your understanding and patience.

8 Tips to Speed Up Your WordPress Site

Only 8 points? Yes, because the fundamental techniques are covered and advanced users will have no difficulty in continuing their experiments using the resources offered at the end of the article.

# 1 – Switch to a good host

There are generally 2 cases: developing your offer to the next level or opting for a new host.

Let me be clear: low-cost shared offers will never allow you to obtain a fast and fluid site. Count in the $100 / year minimum for a quality offer. Web projects that begin to receive several thousand visitors will have to go through semi-dedicated or even dedicated.

# 2 – Compress the images

We will distinguish 2 types of images:

  1. WordPress theme images: they will be loaded once, for all the pages visited (logo, buttons, background, etc.);
  2. Illustrative images of your content (articles, pages, type of personalized content) such as screenshots, photos, etc.);

To go further technically, use CSS sprites which will reduce the number of requests by combining images. This tip is however reserved for informed users.

# 3 – Compress CSS and JavaScript files

In the same way as for images, we can compress CSS and JS.

CSS style sheets contain the different display properties (colors, fonts, structure, etc.). Without it, the web wouldn’t look like much.

JavaScript (JS) files add interaction to energize the site: slideshow, share buttons on social networks, etc. The jQuery and jQuery UI (User Interface) libraries are used by WordPress.

# 4 – Use Gzip compression (server side)

Compressing items by the server before sending them to the client (the Internet browser) is one of the most effective methods of optimization. It considerably reduces the weight of a page and saves you several seconds. The gain is therefore considerable!

To find out if you have such an option, contact your host: DMT web hosting who will be best able to provide you with information.

# 5 – Cache and compress via .htaccess (client side)

Browser caching can be used to prevent unnecessary requests from being sent each time a visitor returns to your site. Logo, CSS and other JS are rarely brought to change on a site: it is therefore interesting that the browser stores them in cache in order to reduce the number of useless requests.

To apply this technique, you just have to modify the .htaccess file located at the root of your Web project, on your FTP server. This rather special file is hidden by default as indicated by the presence of the point at the beginning. Check in the settings of your FTP client (FileZilla, Transmit, CyberDuck).

# 6 – Remove unnecessary plugins

Plugins or extensions bring new functionality to the heart of WordPress. Although they facilitate a large number of technical operations for the beginner, the fact remains that many of them are poorly optimized – without the developer being responsible for them.

Many plugins are useless since a few lines of PHP code will be enough to achieve the same result. I assure you, it is easier than it seems to add / modify functionality in PHP under WordPress .

# 7 – Optimize or change WordPress theme

The WordPress theme is a key element in the speed of display of your site. Quite often, theme developers overload their creations with functionality in order to maximize sales. Unfortunately, it must be recognized that it works because the more you get for your money the happier you are.

However, it is preferable to focus above all on the graphic appearance; additional functionality that can be added later as plugins.

A theme is not a plugin! Think about the consequences the day you change the theme if certain features are directly linked to the theme code… it will not be easy for the average user to migrate a slideshow or the many shortcodes offered (shortcuts that allow you to generate buttons and other columns directly from the editor).

# 8 – Smoothen the display by moving the JavaScript files in the footer

It will be said that a Web page is fluid if there is no blockage during the loading of this one. Some greedy scripts will literally block the display of the page or even slow down the entire browser.

This is due to a bottleneck: too many scripts, kill the scripts!

This technique should only be used by experienced users. Indeed, some scripts will no longer work if you load them at the end of the page.

If the theme is well coded, JS scripts are loaded by the functions.php file (or one of its dependent files) – in no case by the header.php or footer.php file. To be precise, they are injected by functions specific to WordPress directly in these affected locations.

So identify the lines that look like these:

wp_enqueue_script (‘NOM_DU_SCRIPT’, get_template_directory_uri (). ‘/js/fichier_script.js’, ‘file_dependent’, false);

Note the presence of a false parameter at the end of the line. Switching it to true will tell WordPress to load it in the footer and not in the header of the site.

Thus, your visitors will be able to start reading and even click on one of your content even before certain scripts are fully loaded.

Share on facebook
Share
Share on twitter
Share
Share on linkedin
Share
Share on whatsapp
Share

Fill out the form to send Email

DMT Web Hosting is too concerned about the health and safety of both clients and employees. Our office is closed due to countrywide lock down. You can reach us on +92 300 044 4656, +92 321 112 6660 during the lock down period. We appreciate your understanding and patience.