Trying to speed up your WordPress website? You could try to add expires headers into your WordPress .htaccess file to help with this.
Add expires headers to .htaccess file
To add expires headers into your WordPress .htaccess file without a plugin, follow the steps below:
- FTP into your WordPress website’s server.
- Open your .htaccess file, located in the root of your WordPress installation.
- Copy and paste in the code from below.
- Save and re-upload accordingly.
<FilesMatch "(?i)^.*\.(ico|flv|jpg|jpeg|png|gif|js|css|woff)$"> ExpiresActive On ExpiresDefault A2592000
Note, you can also edit your .htaccess file without using an FTP if you have Yoast SEO installed.