Saturday, December 20, 2014

Improve a WordPress website Page Speed by 50% in 5 minutes

The 5 minute page speed improvement guide.

Step 1 – Caching plugin
The plugin W3 Total Cache will cache and compress a load of files to reduce page download time.
  1. Log into WordPress as admin
  2. Plugins -> Add New -> Search ‘total cache’ -> Install ‘W3 Total Cache’
  3. Plugins -> Activate W3 Total Cache
  4. Under the new ‘Performance’ menu -> General Settings -> Select the following:
    1. Enable ‘Page cache’
    2. Enable ‘Minifiy’ (keep default settings)
    3. Enable ‘Browser cache’
  5. Click any ‘save all settings’ button
  6. Select ‘Empty the page cache’ notification if it appears at the top of the page
  7. Double check your WordPress site/blog to make sure everything is working


Step 2 – .htaccess modication (Apache server only)
Modifying the .htaccess file to tell the browser to cache and compress various files to reduce server load and improve page speed performance.
  1. FTP Download the .htaccess file from the root of your WordPress site
  2. Open the .htaccess file using your favourite text editor
  3. Copy and paste the below code at the end of the file and re-upload
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
##### EXPIRE CACHING - LEVERAGE BROWSER CACHING #####
# Enable expirations
ExpiresActive On
# Set default expire time
ExpiresDefault "access 2 week"
# Specify expire time by file type
ExpiresByType image/jpg "access 1 month"
ExpiresByType image/jpeg "access 1 month"
ExpiresByType image/gif "access 1 month"
ExpiresByType image/png "access 1 month"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType image/x-icon "access 1 month"
## END EXPIRE CACHING ##

No comments:

Post a Comment