Select your language

Is your WordPress website taking too long to load and you’re not sure why? This is not just annoying: in the worst-case scenario it can also increase the bounce rate of your visitors. In this article, we’ll outline the possible causes of the problem and give you some tips to improve performance.

Measuring the loading time

Firstly, we recommend measuring your website’s actual loading time. You can then use this later on to see whether any of the changes you make help.

To measure the loading time, you can use the Pingdom tool, for example.

Follow these steps:

  1. Go to the Pingdom website.
  2. Enter your domain in the URL field.
  3. Select your region.
  4. Start the test.
    → Any slow elements will be listed under “File requests”.
  5. Look there for long loading times of elements like plugins, images and scripts and make a note of them.

Optimizations

Thanks to the analysis, you now have an overview of the elements that take a long time to load and slow down your website.

Deactivate plugins

Plugins can considerably impact the performance of your website. We therefore recommend only using the plugins that you really need. Unnecessary plugins include, for example, those that allow you to add the Google Analytics code to your website.

This can be done quickly, without much effort and without a plugin by using these Google Analytics instructions.

To see the impact of each plugin on your website, deactivate all plugins and reactivate each one individually. After reactivating each plugin, measure your page speed to find out which plugin is slowing down your website. Alternatively, you could also use the Query Monitor plugin.

GZIP compression and mod_deflate

GZIP is a compression program that compresses the files from your web server (e.g. text, CSS, images) before sending them to the browser, allowing the files to be transferred faster. You can test whether your website is already being compressed here.

Use the mod_deflate module to enable GZIP compression and save between 40% and 70% of the transfer volume. You can decide for yourself which compression rules to apply.

To enable the module, you need to add code to the website’s .htaccess file. Here’s an example in which text files (TXT, HTML, CSS, etc.) are compressed:

<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</IfModule> 

Further optimizations

The database that WordPress uses is filled with some unnecessary data during operation, such as:

  • Deleted pages
  • Spam comments
  • Edits
  • Deleted plugins

To optimize the database, you’re best off cleaning it up with a plugin such as Autoptimize or wp optimize. After installing the plugin, you may want to optimize CSS, JavaScript and HTML code.

You can also load any images using “lazy loading”. This means that data objects are only loaded when they are needed.

Caching

Caching is a key way of significantly increasing the performance of a website. Caching ensures that WordPress does not have to rebuild every page in the browser, but can instead access a finished version from the created cache. That’s why it’s important to use the server and browser cache.

The easiest way to configure your WordPress website’s cache is with plugins such as W3 Total Cache.

The functions of these plugins include:

  • JavaScript lazy loading
  • Minimize/minify CSS and JavaScript
  • Database optimization
  • Lazy loading
  • Browser caching
  • Page caching

WordPress with Nginx

Hostpoint allows you to use Nginx with reverse proxy and Apache.

A benefit of using Nginx with reverse proxy is that you can use the speed of Nginx in combination with Apache. The Nginx web server handles all static requests to the website while Apache handles the dynamic requests. This means that the Apache web server is less overloaded, resulting in a significant boost in performance.

The results of our tests using Nginx with reverse proxy and Apache were impressive. Compared to the same installation on shared web hosting, website performance increased by 50%. The two systems complement each other perfectly. With WordPress, we therefore recommend always working with a separate cache plugin.

What’s key here is that Nginx only actively caches if the HTTP headers have been set correctly. This article discusses the topic in more detail.

Cronjobs

Another way to improve performance is to replace WP-Cron with real cronjobs. WP-Cron is a WordPress cronjob that performs specific recurring work (e.g. checking for updates). A disadvantage of WP-Cron is that the cronjobs are always executed when the website is accessed. The server then has to process the website request and the cronjobs at the same time, which can overload the web host.

To deactivate WP-Cron and replace it with a real cronjob, do the following:

  1. Log into the Hostpoint Control Panel.
  2. Select your web hosting service.
  3. Click on “Explorer” in the menu and search for the wp-config.php configuration file in the directory of your WordPress website.
  4. Click on “Edit” and, before the line /* That’s all, stop editing! Happy publishing. */, add the instruction define ('DISABLE_WP_CRON', true); to the file.
  5. Click “Save”.
    → WP-Cron has been deactivated. Now you can set up your own cronjob.
  6. In the menu, go to “Advanced” > “Cronjobs Manager”.
  7. Click “Create a cronjob”.
  8. Paste the following code as a command, replacing https://your-own-domain.ch with your website.
  9. wget -q -O - https://your-own-domain.ch/wp-cron.php?doing_wp_cron >/dev/null 2>&1
  10. Set a time interval for execution. This article discusses the topic in more detail.
  11. Click “Save”.

→ The cronjob executes the wp-config.php file at the specified time interval.

Managed Flex Server

If you want to optimize the performance of your website even more, you can switch from shared web hosting to a Managed Flex Server. With a Managed Flex Server, you benefit from more resources (CPU/RAM) and additional cache options such as Redis in combination with cache plugins. All information about Managed Flex Servers can be found on the product page on our website.

Please use this form only to provide feedback on the above guide.
For support requests please use this form instead.

 

 

© 2001 - Hostpoint AG
Cookie

Wir verwenden Cookies  🍪

We use Cookies  🍪

Nous utilisons des cookies  🍪

Utilizziamo dei cookie  🍪

Die digitalen Auftritte von Hostpoint (Website, Control Panel, Support Center etc.) verwenden Cookies. Diese werden dazu verwendet, um Daten über Besucherinteraktionen zu sammeln. Wenn Sie auf «Akzeptieren» klicken, stimmen Sie der Verwendung dieser Cookies für Werbezwecke, Website-Analyse und Support zu. Gewisse essenzielle Cookies sind jedoch für eine ordnungsgemässe Funktion dieser Seiten unerlässlich und können deshalb nicht deaktiviert werden. Auch ohne Ihre Zustimmung können gewisse Daten in anonymisierter Form für statistische Zwecke und zur Verbesserung unserer Websites verwendet werden. Bitte beachten Sie unsere Datenschutzerklärung.

Hostpoint's digital presences (website, Control Panel, Support Center, etc.) use cookies. These are used to collect data on visitor interactions. If you click “Accept”, you agree to the use of these cookies for advertising purposes, website analysis and support. However, certain cookies are essential for the proper functioning of these pages and therefore cannot be disabled. Even without your consent, certain data may be used in anonymized form for statistical purposes and to improve our websites. Please note our Privacy policy.

Le sites Web de Hostpoint (site Web, Control Panel, Centre d'assistance, etc.) utilisent des cookies. Ces cookies servent à collecter des données sur les interactions des visiteurs. En cliquant sur «Accepter», vous consentez à l’utilisation de ces cookies à des fins de publicité, d’analyse du site Web et d’assistance. Certains cookies essentiels sont cependant indispensables au bon fonctionnement de notre sites Web et ne peuvent donc pas être désactivés. Même sans votre consentement, certaines données peuvent être utilisées sous forme anonymisée à des fins statistiques et pour améliorer notre sites Web. Veuillez prendre connaissance de notre Déclaration de protection des données.

Le presenze digitali di Hostpoint (sito web, Pannello di controllo, Support Center, ecc.) utilizzano i cookie. Questi vengono utilizzati per raccogliere dati sulle interazioni dei visitatori. Facendo clic su «Accetta», acconsente all’utilizzo di questi cookie per scopi pubblicitari, di analisi del sito web e di supporto. Alcuni cookie essenziali sono tuttavia indispensabili per il corretto funzionamento di questi siti web e pertanto non possono essere disattivati. Anche senza il Suo consenso, determinati dati potrebbero essere utilizzati in forma anonima per fini statistici e per l’ottimizzazione dei nostri siti web. Si prega di tenere conto della nostra Dichiarazione per la pivacy.

Ablehnen
Decline
Refuser
Rifiuta
Akzeptieren
Accept
Accepter
Accetta