Tips to Speed Up Your WordPress Photography Website

Joachim Bardua

AHome » Tips to Speed Up Your WordPress Photography Website

Tips to speed up your photography website! Nobody likes a slow loading website decreasing the user experience – and Google likes fast websites too …! This article describes how we are speeding up, a website running with WordPress. Our tips help you to improve your website traffic, optimize your conversion rates and increase your revenue!

The result is a whopping performance grade from 99 and a page load time from 570 ms! The screenshots show speed tests performed with tools every webmaster & webdesigner should use: Pingdom Tools, GTmetrix and Yellow Lab Tools.

Pingdom Website Speed Test:
GTmetrix Website Speed Test

Website Speed: Hosting & Server

Choosing a provider and the approbate technology is the first step. Outdoor-Lights is running on a server managed by Host Europe.

Our server specifications:

  • Managed webserver
  • Database on separate SSD
  • 100 GB disk space in RAID
  • Guaranteed 2 GB RAM
  • Traffic flat rate up to 100 Mbit
  • Host system with 2 x 6 Cores Intel CPU
  • PHP Version 5.6

WordPress is a database-driven content management system. So a database on a fast SSD is a must-have for all wordpress-websites. The next step in performance optimization will be PHP 7 (maybe next year …), which will be a substantial performance improvement for WordPress – ask your hosting provider when PHP 7 will be ready!

Website Speed: Server & WordPress Configuration

In the WWW you can find thousands of optimization guides for WordPress. In our overview we give you some tips for the first steps:

  • Increase your WordPress memory limit: Add this code to your wp-config.php define('WP_MEMORY_LIMIT','256M'); (depending on the server settings)
  • Add DNS prefetching to your header (, example:

    <meta http-equiv=”x-dns-prefetch-control” content=”on”>
    <link rel=”dns-prefetch” href=”//”>
    <link rel=”dns-prefetch” href=”//”>
    <link rel=”dns-prefetch” href=”//”>

  • Set expires headers (via .htaccess file)
  • Enable gzip compression and mod_deflate (via .htaccess file)

Our .htaccess file looks like this (with WebP support and optimized for Cache Enabler plugin):

# Use UTF-8 encoding for anything served text/plain or text/html
AddDefaultCharset UTF-8
# Force UTF-8 for a number of file formats

AddCharset UTF-8 .atom .css .js .json .rss .vtt .xml

ForceType application/octet-stream
Header add Content-Disposition attachment

RewriteEngine On
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{DOCUMENT_ROOT}/$1.webp -f
RewriteRule ^(wp-content/uploads.+)\.(jpe?g|png)$ $1.webp [T=image/webp,E=accept:1]

Header append Vary Accept env=REDIRECT_accept

AddType image/webp .webp

Header set Cache-Control “max-age=84600, public”

SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml

# Drop problematic browsers
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

# Explicitly exclude binary files from compression just in case
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|pdf|swf|ico|zip|ttf|eot|svg)$ no-gzip

# Make sure proxies don’t deliver the wrong content
Header append Vary User-Agent env=!dont-vary

# Start Cache Enabler

RewriteEngine On

# webp HTML file
RewriteCond %{REQUEST_URI} /$
RewriteCond %{REQUEST_URI} !^/wp-admin/.*
RewriteCond %{QUERY_STRING} =””
RewriteCond %{HTTP_COOKIE} !(wp-postpass|wordpress_logged_in|comment_author)_
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{HTTP:Accept} image/webp
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/cache-enabler/%{HTTP_HOST}%{REQUEST_URI}index-webp.html.gz -f
RewriteRule ^(.*) /wp-content/cache/cache-enabler/%{HTTP_HOST}%{REQUEST_URI}index-webp.html.gz [L]

# gzip HTML file
RewriteCond %{REQUEST_URI} /$
RewriteCond %{REQUEST_URI} !^/wp-admin/.*
RewriteCond %{QUERY_STRING} =””
RewriteCond %{HTTP_COOKIE} !(wp-postpass|wordpress_logged_in|comment_author)_
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/cache-enabler/%{HTTP_HOST}%{REQUEST_URI}index.html.gz -f
RewriteRule ^(.*) /wp-content/cache/cache-enabler/%{HTTP_HOST}%{REQUEST_URI}index.html.gz [L]

AddType text/html .gz
AddEncoding gzip .gz

# default HTML file
RewriteCond %{REQUEST_URI} /$
RewriteCond %{REQUEST_URI} !^/wp-admin/.*
RewriteCond %{QUERY_STRING} =””
RewriteCond %{HTTP_COOKIE} !(wp-postpass|wordpress_logged_in|comment_author)_
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/cache-enabler/%{HTTP_HOST}%{REQUEST_URI}index.html -f
RewriteRule ^(.*) /wp-content/cache/cache-enabler/%{HTTP_HOST}%{REQUEST_URI}index.html [L]

# End Cache Enabler


ExpiresActive On
ExpiresByType image/jpg “access 1 year”
ExpiresByType image/jpeg “access 1 year”
ExpiresByType image/gif “access 1 year”
ExpiresByType image/png “access 1 year”
ExpiresByType text/css “access 1 month”
ExpiresByType text/html “access 1 month”
ExpiresByType application/pdf “access 1 month”
ExpiresByType text/x-javascript “access 1 month”
ExpiresByType application/x-shockwave-flash “access 1 month”
ExpiresByType image/x-icon “access 1 year”
ExpiresByType application/ “access plus 1 day”
ExpiresByType font/ttf “access plus 1 day”
ExpiresByType font/otf “access plus 1 day”
ExpiresByType font/x-woff “access plus 1 day”
ExpiresByType image/svg+xml “access plus 1 day”
ExpiresByType video/ogg “access plus 1 day”
ExpiresByType video/ogg “access plus 1 day”
ExpiresDefault “access 1 month”


# FileETag None is not enough for every server.

Header unset ETag

# Since we’re sending far-future expires, we don’t need ETags for static content.
FileETag None

Website Speed: Plugins

Be careful with WordPress plugins! Use only plugins you really need! Plugins can have a huge impact on the server performance, e.g. causing high CPU, loading .js files, .css files, fonts and so on.

Especially social sharing plugins can slow down WordPress. Our tip is using Shariff Wrapper.

Deactivate (but not uninstall) rarely used plugins like WP-Sweep (see below, used for database optimization).

Tip, with the plugin WP Performance Profiler (not free, $9.-) you can test the performance of all installed and activated plugins.

Website Speed: CDN (Content Delivery Network)

The next step in performance optimization is using a CDN, especially when your website delivers lots of images to readers all over the world. Static content like images, css & js files is delivered from a CDN server close to the reader, improving the page load time and reducing the load on your server.

We decided to use Amazon CloudFront as a CDN. For this solution we use the following WordPress plugins:

Update: We switched to a pull CDN from (easy setup, great support, free ssl certificate, WebP support) and are using their CDN Enabler plugin.

Website Speed: Three killer plugins to speed up your website

Every WordPress site should use a caching plugin! We are using WP Super Cache, a plugin which delivers stunning results, even with PHP caching. The setup of WP Super Cache is done with some clicks (opposite to caching plugins like W3 Total Cache).

Update Feb. 2016: Now using Cache Enabler

The second killer plugin is Autoptimize for aggregating and minimizing JS, CSS and HTML. The installation is quite easy, but it might be possible that you must use the function “Exclude scripts from Autoptimize”. Why? Depending on your WordPress theme and the installed plugins, some scripts (e.g. jquery.js) should be excluded from being aggregated, otherwise some functions are not working properly (a bit of testing is necessary).

The last must-have plugin is Gonzales. Gonzales turns off css and js files on single post and pages. Needs some testing – but speeds up your website!

Website Speed: Database Optimization

Optimize your database! A plugin like WP-Sweep cleans your database and optimizes the tables (never do it without a database backup!).

Another option is to clean the database manually, especially the “options” table. You need a SQL browser and WordPress know-how for deleting unused rows in this table (e.g. from old and uninstalled plugins) – again, only with a database backup!

Website Speed: Squeeze your images

Photography websites are using lots of images. The images must be optimized for the web, otherwise the page load time can be frustrating. This topic is a bit tricky – image quality versus image size – but with some practice and some tools you can mange this.

The last step of our image processing workflow is using the “Save for Web (Legacy)” function in Photoshop. The optimized images are resized to 1200×800 pixel and exported as jpeg files. Photoshop allows some export options, most important is the quality level.

The following gallery shows an image in different quality levels. The file size is:

  • Image 1: Quality 100%, 1,2 MB
  • Image 2: Quality 70%, 459 KB
  • Image 3: Quality 50%, 275 Kb
  • Image 4: Quality 30%, 187 KB

But that’s not all. After the export you could save some more kilobytes. Example, the app ImageOptim for Mac would decrease the size of additional 6,3% (Quality 100%), 5,0%, 4,2% and 3,3% (Quality 30%).

Conclusion: A export quality between 30% and 50% is sufficient, smaller images save bandwith and speed up your website.

But how to squeeze image you are already using? Download them from your server with FTP, squeeze and upload again. A good tool for Windows is Riot (after the upload, do not forget to set the metadata for all images, e.g.: Cache-Control “max-age=315360000“; Expires “Thu, 12 Feb 2026 10:15:49 GMT“)

Update Feb. 2016: Now using Optimus with WebP support!

Website Speed: Banner Ads

You want to make money with your website? You are using banner ads? Bad, because these ads slow down you site.

Look a the next screenshot, how many additional HTTP requests are caused by one banner!. So it might be better to use text links instead of banner ads. The Lazy-Ads script might help, but we did not tested it yet.

Website Speed Test: http requests caused by one banner ad

Website Speed: Other Stuff

  • Turn off avatars (WordPress settings > discussions)
  • Lazy load your images, our favorite plugin: Crazy Lazy (works with WordPress 4.4!)

Website Speed: More Ressources

Website Speed: Conclusion

Speed rules – especially for the mobile internet! Everyone – readers, Google – loves speed, optimizing your website is an absolutely necessary step!

Some of our tips are implemented in minutes, some need a profound knowledge! Your first steps should be:

  • Turn off unused plugins
  • WordPress configuration (.htaccess)
  • Install WP Super Cache, Autoptimize & Gonzales
  • Install Crazy Lazy and WP-Sweep
  • Optimize your database
  • Optimize your posts and pages with Gonzales
  • CDN setup
  • Squeeze your images

Your rating: 1 Star2 Stars3 Stars4 Stars5 Stars (10 votes, average: 4.10 out of 5)