speeding up your WordPress - how to optimize performance

Posted by & filed under List Posts.

You want to get your WordPress speed as fast as possible, for a few key reasons:

  • Ecommerce shoppers can be incredibly impatient when it comes to page load time. In fact, the average attention span dropped from 12 seconds to 7 seconds between 2000 and 2016. Since performance is so important, focusing on that aspect of your business will yield more sales.
  • The extent to which people demand a fast load time is backed up by studies. Research has shown that 47% of people who visit a website will bounce away if the site fails to load in just 2 seconds.
  • While we know that people prefer faster sites since they can get what they need faster, the search engines reflect that same perspective: Google and other search engines use speed as a ranking factor.

There is an incredibly small amount of time to show anyone who visits your site what you have and try to get them interested in buying. If your site is not performing at a fast clip, you will spend that tiny piece of time the user is giving you failing to get them what they want. Research from Strange Loop found that there is a 16% drop in satisfaction, 11% fewer page views, and 7% reduction in conversion when page load time is slowed down by just 1 second.

Check your site speed.

To get a sense of how your site performs in different areas, you can use an online tool such as Pingdom to test from different geographical regions.

Streamline and optimize plugins.

You do not want to have any plugins active on your site that are not necessary and holding up their weight. You want to minimize them, and you can sometimes determine the best ones by deactivating them one at a time and checking server speed.

To optimize your plugins, you can check for any inefficiencies in the code. You specifically want to look for any calls to the database that are not needed. “WordPress has its own caching system, so generally speaking, using functions like get_option(), update_option() and so on will be faster than writing SQL,” noted the WordPress Codex.

Use a WordPress caching plugin. 

WordPress sites run a process that looks for necessary information, assembles it, and shows it to your customers – building in that dynamic way each time the site is accessed. Each time someone goes to your site, the server will gather information from your PHP files and MySQL database, compiling it into HTML content to be presented to the visitor.

That retrieval and building can lead to poor performance if there are many people using your site at the same time. Using a caching plugin, just by itself, can make your site 2 to 5 times as fast, per WPBeginner.

Instead of building the site from scratch each time a new user visits, the plugin copies the page when it loads for the first person, sending the cached copy to anyone else who visits. 

Decrease the size of CSS and JS files.

You can speed up how fast your site loads pages by minimizing size of JS and CSS files, as well as by getting the number of their server calls as low as possible. Minification of JS and CSS files is one of the recommendations within Google PageSpeed Insights.

You can manually speed up your site by going through the themes, or use plugins. The one suggested by CodeinWP is Autoptimize. 

Shrink images. 

You want to get the image size down as much as possible without losing any quality. PhotoShop, a Chrome PageSpeed Insights extension, and other software can be slow in reducing image size. Plugins that specialize in this task are preferable. EWWW Image Optimizer, WP Smush, and Optimole are all prominent, well-rated options. Any of those plugins will help you significantly get down the size of your images and, in turn, accelerate your performance. 

Keep your site updated. 

WordPress is updated often. Those updates include security patches, new features, and bug fixes. The plugins and themes you use should have new versions released on a routine basis too.

If your site does not have the newest versions of the core code, theme, and plugins, you will be more at-risk for security issues and will also be hurt by poor speed. For that reason, you want to make sure that the most recent versions of all your WordPress site elements are installed. 

Optimize your themes. 

You can end up with a massive amount of PHP within WordPress – because every time a page loads, a large chunk of code has to be parsed via PHP.

Particularly within shared hosting settings, you can have bad speed on your site because of this parsing process. OPcode caching can be helpful for this aspect. You do not need to reparse the PHP nearly as much because your PHP content is set aside within a cache for temporary holding.

OPcode caching has been provided in the past via third-parties, the most popular of which was Zend. When PHP 5.5 was released, Zend open sourced its code and gave it to the PHP project, so it is now standardly part of PHP.

OPcache is supported by PHP 5.5 and later. Keep your PHP version updated. Newer releases will have additional options for this feature.

Optimize themes.

Themes can put as much as 3 times as much load on the server due to excess and unoptimized database queries – so that is a key point. However, total file characteristics and image files also must be addressed.

  • Practice query optimization and minimization. You may want to hardcode static values into your theme. That can reduce queries. The downside is that you could need to edit the code each time you change it. Your site title and site charset are examples of ones that you could hardcode. You can do the same with menus so that your site does not run wp_list_pages() or similar functions.
  • Get the size and number of your total files down. Minify your JS and CSS files. Create single, optimized files out of various CSS files. Get the number of files that you use to display the average page on your site as small as possible. You can use plugins to aid your efforts.
  • Reduce image files. Check for any images that you do not need, that could perhaps be replaced by text. Check that the images are in the best format for the image type, and that they are optimized. You can also benefit from plugins such as WP Smush.it.

Improve hosting.

As noted in CodeinWP, your first consideration when it comes to trying to speed up your WordPress performance is the infrastructure, which means improving your hosting. Shared hosting is the most inexpensive option, so it is understandable that smaller businesses turn toward it upfront. Shared hosting will not provide strong performance during peak hours, though. There are too many other sites that are tapping into the same pool of resources that you are.  Within a cloud environment, you can set up virtual servers that allow you to maintain strong performance, with better demarcation between the different accounts.

Do you want to optimize the speed of your WordPress site? It is critical to your results. At Total Server Solutions, our cloud hosting boasts the highest levels of performance in the industry. Build your WordPress cloud now.