Soliloquy Documentation

Documentation, Reference Materials, and Tutorials for Soliloquy

How to Optimize Your Website and Images for Speed

Would you like Soliloquy and your website in general to perform at their very best? We’ll cover several important optimization topics in this tutorial to get the most out of our WordPress site. This tutorial will walk you through the steps needed to optimize for speed.

This tutorial is a bit more technical than our other docs, but we’ll walk you through the process, step by step. In order to follow some of these steps, additional tools, plugins, and host changes may be required. Test your website’s speed before and after you’ve made optimizations, to compare.
Before completing any of the steps below and when making changes in general, it’s important to make a backup of your site. Many hosts do this automatically or can be configured to do so, but at the WordPress level, we recommend the UpdraftPlus plugin.

Optimize Your Hosting

It all starts with picking a good host to begin with. We both use and recommend SiteGround.

Although, if you have a larger budget for your project or know that you’ll be needing to support hundreds or thousands of photos and have a high volume of traffic, something more scalable like WP Engine may be in order.

Whether you’re interested in one of the recommendations above or already have hosting, making sure that your server is already on or is capable of being upgraded to PHP 7+ is absolutely vital. Not just for Soliloquy’s performance but for your WordPress install and overall website performance.

In some tests, PHP 7 is up to 50% faster than PHP 5.

Confirm Your PHP Version

If you’re not already on PHP 7+ we recommend you contact your hosting company to request an upgrade for you PHP version.

If you’re not sure how to find out your PHP version you can contact your hosting company or you can install a plugin like WordPress PHP Info to check the specific server configuration you have installed.

Other Server Config Recommendations

As shown below, you’ll find some other helpful recommendations for your server configuration:

  • Set up server-side caching like Memcached and Varnish. You’ll need to search your host’s documentation or contact their support to see if this is available to you.
  • Linux
  • PHP 7+
  • PHP Memory Limit: 256MB
  • MySQL 5.6+

You can see what WordPress recommends for your server setup on their requirements page.

Getting the Most Out of Your WordPress Install

Over time, your WordPress install can become quite bloated. Follow these steps to make sure your install is running at optimum capacity:

  • It’s always important to keep your theme, plugins, and WordPress itself up-to-date.
  • It’s a good idea to do a plugin audit every now and then and delete out anything you don’t need.
  • WordPress automatically generates many intermediate images (multiple sizes of the same image), that you both might not even know exist or will never use. There’s no reason to devote precious server resources to the generation and storage of these files. With the Stop Generating Image Sizes plugin, you can eliminate this behavior.
  • WordPress automatically saves unlimited post revisions, which can amount to thousands of needless posts, which can bloat your database. Stop this behavior by adding this line to your wp-config.php file: define( 'WP_POST_REVISIONS', 3 ); to limit the revision count to only the latest 3 revisions.
  • After adding that, it would be a great time to delete all those backed up revisions and generally clean up your database with the WP-Optimize plugin.
  • Install a caching plugin. There are many cache plugins available. W3 Total Cache is an excellent free option. WP Rocket is a great premium option, that is much easier to use. Caching plugins are advanced and require careful configuration to not break site features. If your sliders are broken after installing a caching plugin, start by disabling its JS minification settings.
  • Install Cloudflare (free). Cloudflare both integrates with and compliments WP Rocket.
W3 Total Cache, WP Rocket, Cloudflare, or any caching solutions or CDNs (Content Delivery Networks) in general have been known to cause conflicts. Unless you’re experienced in configuring these solutions properly, you may need to seek help from a pro.
Address Expires Headers

Alternatively, instead of installing a plugin or service as mentioned above (which will handle most optimizations automatically), if that’s too difficult, impossible, or is causing too many conflicts, you can take a more surgical approach to address Expires Headers, Browser Caching, and GZIP Compression recommendations.

To do this, check out the GTMetrix article on how to Add Expires headers.

Remove Query Strings

You can also remove query strings from JS and CSS files by using a free plugin called Remove Query Strings From Static Resources.

Optimizing Your Images

It’s very important to optimize your images to get the smallest file size possible. With the right steps and tools, it’s also possible to do this without losing any noticeable quality.

You can use a plugin to optimize your images.  We recommend one of the following:

  • https://wordpress.org/plugins/ewww-image-optimizer/
  • https://wordpress.org/plugins/tiny-compress-images/
  • https://wordpress.org/plugins/wp-smushit/
Please note that if retaining the metadata for images is important to you, you’ll need to carefully turn off that feature in various compression tools.

And that’s it. Whether you only tried a few of these optimization techniques or all of them, you should have a noticeably zippier website.

Check out some of our other tutorials, such as How to Limit Number of Images Displayed.


FAQs

Q: How do I check my site/page speed?

A: We recommend GTmetrix. Pingdom and Google’s PageSpeed Insights are also pretty good tools.