- Use Cache
- Minify and optimize resources
- Optimize images and videos
- Optimize the tables in your database
- Optimize your website’s code
- Correct http to https routing
- Turn off wp-cron
- Review wp-config.php
- Upgrade your PHP version
Optimize your WordPress site with our tips
Web performance is an indicator of how quickly and efficiently your site loads. It’s one of the most important things you can monitor. Who doesn’t want their website to load as fast as possible?
That’s why we as a web host work extra hard on performance and offer specific WordPress support for those who need it. But there are also some things you can do yourself to make your site as good as it can be.
In this article, you’ll learn 9 practical, hands-on tips that are good to know about optimizing your WordPress site. We’ll be as specific as possible, but some actions will vary depending on several parameters such as the software you use.
Why is a fast website and short loading times so important?
The user experience is always at the center, and a fast website is crucial because it directly affects the user experience. When a website loads quickly, the visitor is happier and stays longer, increasing the chances of them interacting with your content. This could be buying a product or filling in a form.
Long loading times, on the other hand, often lead to frustration and the visitor leaving the page. This risks resulting in more lost purchases, reduced engagement or, in the worst case, bad reviews.
Loading times also play a big role in how search engines like Google rank websites. A faster site has a better chance of ranking high in search results, which increases visibility, which in turn gives a greater chance of more visitors.

How do I measure the performance of my site?
Before you start: it’s important to use a tool that does a modern analysis of the website. Two tools that do good analysis and also give you recommendations are Google Page Speed Insights and GT Metrix.
The reports they provide are basically based on the same technology and are very similar. GT Metrix gives you a little more choice in how the measurement is done, including from which country.
Keep in mind… that the geographical distance between the test server and your website’s server matters when measuring your performance. If you can, choose a test server that is geographically close to your main target audience.
9 tips to improve performance
Optimizing your WordPress site is a broad area with many different measures you can use. Some will bring big improvements, while others will have a smaller effect, but together they can make a big difference. It’s important to always keep performance in mind and to work in a way that makes performance part of the ongoing work.
1. Use cache
Every time a visitor comes to your website, a lot of things happen that you might not think about. All files are loaded, content is served and settings are retrieved from the database. The same thing every time.
Cache is computer language for temporary storage. It’s a technique used to store copies of frequently used or requested data in a way that is faster to access than the original way.
Togive an example: when you visit a website, some parts of the page, such as images or scripts, may be saved in your browser’s cache. The next time you visit the same page, these elements are retrieved directly from the cache instead of from the internet, making the page load faster.
When you update the content of a page, you need to clear these temporary files for the latest information to appear. Otherwise, the old information will be displayed to the visitor.
There are different levels of cache: server level and browser level.
At the server level, calculations and retrievals from the database and code are handled. The result is saved to temporary files on the server, or in the server’s memory.
The browser stores resources that you load for the visitor, such as images, fonts, style sheets (CSS) and JavaScript. Your website tells the browser how long you want it to save before it reloads the file.
Are you using WordPress with LiteSpeed? Here’s how to set up caching in practice.
So what should you do with cache?
To get a faster website, you can:
- Make sure static resources are cached in the browser for as long as possible
- Make sure dynamic pages are cached to reduce the number of times full fetches need to happen
- Use an object cache to speed up calls to the database. A good plugin that many people use is LiteSpeed Cache.
2. Minify and optimize resources
You should always aim to minimize the amount of resources you load overall. The fewer, the faster. This should be kept in mind when installing extensions, adjusting appearance or creating content.
A common performance thief is fonts, for example from Google Fonts. Every extra font and variant you load affects the loading time. Therefore, choose few fonts (preferably no more than two) and only the styles you really need.
Minify CSS and JavaScript
When you write code, you have a lot of white space: there are spaces, blank lines, comments. Without this, the code would be difficult to work with and develop. But for a browser, it’s completely unnecessary. Minification allows you to automatically make CSS and JavaScript files smaller and therefore faster to load.
Reduce the amount of unused CSS and JavaScript
Not all code is used everywhere, and sometimes different scripts are loaded that achieve the same effect. By loading only the code that is actually used, we make the website smaller in size, and thus faster. One way to optimize is to review which scripts are redundant so you don’t load a script on a page when it’s not needed.
Load images and JavaScript deferred
When you load resources, the website will wait until everything is loaded. Most of the time, however, not all images or JavaScript are needed for the visitor to use the website.
By deferring the loading of images and JavaScript, you are telling the browser to prioritize the important stuff, and then load the rest while the visitor is using the website. This leads to improved loading times.
For images, you can also load a low-resolution placeholder while the larger images are loading.
Are you using WordPress with LiteSpeed? Here’s how to best optimize your resources with LiteSpeed.
Reduce the amount of external calls
External resources are usually tracking pixels or scripts that reside on a different server than your own. Sending a query for a resource on another server and getting it back takes time. How long depends a lot on how fast the other server is, and how far away it is geographically.
A good rule is to reduce the amount of external calls you make to the most necessary ones. So consider whether those external tools are really needed. Data that needs to be retrieved externally will always take the most time.
3. Optimize images and videos
Media on a website is usually what takes the longest time to load. Images and especially movies are usually large files in relation to everything else on your website. At the same time, media is important for creating a good experience.
It may sound strange, but you can optimize many images very much without affecting the image quality significantly. In simple terms, this means that you clean the image file of “unnecessary” data. The quality will be slightly lower, but often not noticeable to the eye. Usually it can reduce the file size by more than 50%.
Many publishing systems or add-ons to systems automatically optimize images you upload so you don’t have to think about it. It’s by far the most convenient way to work with image optimization.
Are you using WordPress with LiteSpeed? Here’s the best practical way to optimize images and videos.
If you use movies on your website, especially as a background, you need to pay extra attention to the size. Movies quickly become large and then take a long time to load. You need to do this yourself on your computer before uploading the movie.
You should aim for as small a file size as possible. Already above about 1-2MB, you will notice significant performance degradation. This requires that the movie is compressed, short and not too big in dimensions. So you can skip full HD.
4. Optimize the tables in your database
Most publishing systems, including WordPress, use a database to store content and settings. Like many things, it needs maintenance.
Over time, a database becomes fragmented. A large database that is fragmented slows down the entire website. Optimizing your tables through PhpMyAdmin sorts the data and makes the database, and thus your website, faster.
Optimizing tables is something you can do regularly.
Are you using WordPress with LiteSpeed? Here’s how to optimize the tables in your database in practice.
5. Optimize your website’s code
The real determinant of how fast a website runs is how good the code is. Code can be written more or less efficiently and thus run more or less quickly. Everything from how database queries are made to how the logic in the code is structured affects how fast the website runs. For each new visit to the page, the server needs to run more logic.
To summarize it less technically: the more features you add, the slower your site will be.
If you’re using WordPress, this can include reducing the number of plugins and avoiding adding large plugins that do more than you need.
6. Proper http to https routing
Redirect traffic to https via the .htaccess file instead of using an extension for this or letting PHP handle it. Here you have an example.
7. turn off wp-cron.php
WordPress cron is triggered every time a user visits the website. If you have a lot of visitors at the same time, this will negatively affect the performance of the website. WordPress cron should be turned off and run via server cron instead.
How often to run cron
We recommend running the cron job once per minute if it is a dynamic website, such as a webshop, otherwise we recommend once every 5 minutes. Here is another example.
8. Go through wp-config.php
Checking wp-config.php is important when you want to improve the performance of a WordPress site. This file contains configurations & constants that affect how efficiently and securely your website works. By adjusting “DB_CACHE” or increasing “WP_MEMORY_LIMIT”, you can improve page load times as well as determine how much memory PHP/WordPress can use.
By limiting the number of post revisions and adjusting the autosave interval, you can reduce the database size, speeding up database queries.
Security
Via wp-config.php, you can implement protective measures such as setting unique authentication keys, disabling file editing directly from the WordPress interface, and restricting access to sensitive functions, which protects the site from potential attacks and thus also improves performance by reducing the risk of malicious intrusions.
Are you using WordPress with LiteSpeed? Here’s how to best optimize your resources with LiteSpeed.
9. Upgrade your PHP version
Updating your PHP version is a simple and effective way to improve your performance and optimize your WordPress site. It contributes to faster loading times, better resource utilization, increased security, and improved compatibility.
Faster performance
Newer PHP versions are significantly faster than older versions. An updated PHP version can handle more requests per second, leading to faster load times and better user experience. WordPress sites running on PHP 8.0 or later can be up to 3-4 times faster than those running PHP 5.x.
Better resource utilization
Improvements in newer versions mean that the server uses less memory and CPU to run the same type of code. This means a server can handle more visitors without negatively impacting performance, which is especially important for high-traffic sites.
Did you have a good time optimizing your WordPress site?
We hope you found our tips useful. It’s not always the easiest thing to do, but patience wins. If you don’t want to manage your WordPress yourself, we and many others offer dedicated WordPress support. You can also order just an optimization, where we, among other things, go through the tips we mentioned and several other parameters to streamline your website.