Many web developers are constantly looking for the best ways to speed up their WordPress websites. Some succeed, some fail, and some even end up breaking their sites completely. In this guide, I’ll share a simple but very effective tip to help make your WordPress site load faster.
There are actually many optimization methods we can talk about, but for now, let’s focus on one important topic: Image Optimization. Simply put, this is the process of reducing the file size of images on your WordPress site without drastically reducing quality.
Image Optimization Plugin
One of the easiest ways to optimize images in WordPress is by using a free plugin called EWWW Image Optimizer. You can download it directly from the WordPress plugin repository.
This plugin can compress existing images as well as any new images you upload in real time. From my experience, I managed to save more than 200MB of image data using this tool.
Steps:
-
Install and activate EWWW Image Optimizer
-
No complicated setup needed — default settings are fine
-
To optimize previously uploaded images, go to Media Library or directly choose Bulk Optimize
-
If using Media Library, switch to List View
-
Increase the number of images displayed via Screen Options
-
Select all images
-
Choose Bulk Actions → Bulk Optimize
-
Run the optimization process for all images
Benefits of Reducing Image Size in WordPress
Once your images are optimized, you’ll immediately notice improvements. Your site loads faster, and speed testing tools like Pingdom, GTMetrix, and Google PageSpeed Insights will give you better performance scores. Better speed and optimization also help improve your site’s SEO and ranking on Google.
Enable Leverage Browser Caching via .htaccess
What is “Leverage Browser Caching”?
In simple terms, when someone visits your website, their browser downloads static assets like images, CSS, and JavaScript files. With caching enabled, these files are temporarily stored so the next visit loads much faster, reducing server load and bandwidth usage.
How to Enable Browser Caching (Apache)
-
Open your website via FTP
-
Find your
.htaccessfile -
Edit it using Notepad or Notepad++
-
Add the caching rules
IfModule mod_expires.c
ExpiresActive On
ExpiresByType image/gif "access plus 6 month"
ExpiresByType image/jpeg "access plus 6 month"
ExpiresByType image/png "access plus 6 month"
ExpiresByType application/javascript "modification plus 1 month"
ExpiresByType text/css "modification plus 1 month"
IfModule;
5. Save and upload
After that, test using GTMetrix to make sure it works.
If it still doesn’t work, contact your hosting provider and ask them to enable browser caching manually. If you manage your own server, you’ll need to configure it directly.
For NGINX Users
-
Edit your NGINX configuration file using SSH or SFTP
Usually located at:
/etc/nginx/sites-available/yourdomain.com.conf
Input this code:
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
expires 365d;
}location ~* \.(pdf)$ {
expires 30d;
}
2. Add the appropriate caching configuration code:
sudo /etc/init.d/nginx restart
sudo service nginx restart
3. Restart Nginx
Final Thoughts
That’s it for this tutorial on how to speed up your WordPress website using image optimization and browser caching. These simple steps can significantly improve loading speed, user experience, and SEO performance.