So you got the dreaded email of please optimize your site, or your site is loading slow, or why is the page giving 500 errors. There are several things that can cause these errors. Below I'll go over some things you can do to help in lowering those process limits to allow more traffic and less server load to focus on the important things, your customers.

Doing these two things will greatly increase your score in GTMetrix, especially WordPress!

The first and most easiest thing is always the first thing to be read when a site is loading and that is your .htaccess file. In the .htaccess file you will find all things that guide and tell your site to load from how to send the data to the file that will guide it all. Pasting this in the top of your .htaccess will allow the site to reduce server load, send data faster, and place the load on the customer instead of the server.

Secondly, if you are using WordPress to host your site, it is strongly recommended to use W3 Total Cache. It is more effective than WP Rocket and WP Supercache. 

Step 1: Go to the .htaccess file and add this to the top of the file:

FileETag none
<IfModule mod_expires.c>
<IfModule mod_headers.c>
 ExpiresActive On
 ExpiresDefault A0
 ExpiresDefault "access plus 1 month"
 ExpiresByType image/x-icon "access plus 1 year"
 ExpiresByType image/gif "access plus 1 month"
 ExpiresByType image/png "access plus 1 month"
 ExpiresByType image/jpg "access plus 1 month"
 ExpiresByType image/jpeg "access plus 1 month"
 ExpiresByType text/css "access 1 month"
 ExpiresByType application/javascript "access plus 1 year"
<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$">
 ExpiresDefault A29030400
 Header append Cache-Control "public"
</FilesMatch>
<FilesMatch "\.(gif|jpg|jpeg|png|swf)$">
 Header append Cache-Control "public"
</FilesMatch>
<FilesMatch "\.(xml|txt|html|js|css)$">
 Header append Cache-Control "proxy-revalidate"
</FilesMatch>
<FilesMatch "\.(php|cgi|pl|htm)$">
 ExpiresActive Off
 Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
 Header set Pragma "no-cache"
</FilesMatch>
</IfModule>
</IfModule>
<IfModule mod_deflate.c>
 SetOutputFilter DEFLATE
 BrowserMatch ^Mozilla/4 gzip-only-text/html
 BrowserMatch ^Mozilla/4\.0[678] no-gzip
 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
 SetEnvIfNoCase Request_URI \
 \.(?:gif|jpe?g|png)$ no-gzip dont-vary
 Header append Vary User-Agent env=!dont-vary
</IfModule>

Step 2: Setting W3 Total Cache

  1. Go to your WP-Admin
  2. Go to Plugins
  3. Click Add New
  4. Search W3 Total Cache
  5. Click Install
  6. At the top of WP-Admin, you will see Performance
  7. Click General Settings
  8. Select Page Cache Enable
  9. Select Page Cache Method "Disk Enhanced"
  10. Minify mode "Auto"
  11. Minify Cache Method "Disk"
  12. Database Cache "Enable"
  13. Database Method "Disk"
  14. Browser Cache: "Enable"
  15. CDN "Enable"
  16. CDN Type "Stackpath"
  17. Enable Lazy Load Images (Click the check box)
  18. Click Save Settings & Purge Caches

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.