Elegant Themes Blog

Stay up to date with our most recent news and updates

Optimize Your WordPress Website Using These Simple Tips

Posted on January 21 by in Tips & Tricks | 183 comments

Optimize Your WordPress Website Using These Simple Tips

The time it takes your website to load influences how successful it will be. If your website is slow, visitors will turn away in droves. They might even click the back button before your website loads.

Website performance will also influence your rankings in search engines. In addition to being ranked higher, many website owners report seeing an increase in search engine spider crawling after speeding up their design.

Today, I would like to share with you thirteen quick tips on how you can optimize your website and decrease page loading times. If you follow these techniques and best practices, your website will load much quicker.

Before applying these techniques to your website, I encourage you to check the speed of your website using a free performance service such as GTMetrix, YSlow or Google PageSpeed Insights. These services will inform you of your page loading time and the overall file size of your page. They also offer tips

1. Choose the Right Hosting Plan

The first step in optimizing your website correctly is to choose the right hosting plan. You are fighting a losing battle if your server is taking an age to process HTTP requests and MySQL commands.

Performance services such as GTMetrix will advise you of the exact response time of your server. I recommend testing the response time of your own website against similar websites. For example, if you run a photography blog, see how your server response time compares to other photography blogs within your niche.

Hosting companies are not always the cause. You may be with a great hosting company but see poor response times because your chosen hosting plan is underpowered. Customers using shared hosting plans, for example, are more likely to face slow loading times as hundreds of websites are hosted on the same server.

However, any type of hosting plan will suffer from insufficient RAM and CPU throttling. Therefore, you need to pay attention to what your website needs to run smoothly. Do not be a cheapskate and go for the cheapest option. Choose a hosting plan that can handle traffic spikes efficiently.

2. Use a Fast WordPress Theme

A design that has been coded badly, or uses images throughout the design, will add unnecessary weight to your page. It is not uncommon for some WordPress themes to be a few megabytes in size. Such a design could add a few seconds to your page loading time.

Choose a design that has been optimized for desktops, tablets and mobile devices. Search engines favor responsive designs as they ensure all pages have the same URL, however adaptive designs that were created specifically for mobile phones can improve a mobile user’s experience considerably (it is not uncommon for an adaptive design to reduce page size by over one megabyte).

Unfortunately, most theme developers optimize their theme demo website using caching and content delivery networks. This makes is difficult to know how quick a WordPress design is before using it yourself.

3. Monitor Your Plugins

Before you install any plugin on your website, ask yourself “Is this plugin necessary?”.

Plugins are one of the biggest causes of WordPress websites being slow. The more plugins you install without research, the more likely you will face performance issues; however the sheer number of plugins you have installed is not the reason a WordPress website can slow down.

Certain plugins are known for causing websites to be slow. There are many reasons for this including bad coding, calls to external servers and persistent calls and updating of your WordPress database. Pay close attention to how much CPU plugins use too. Many plugins can bottleneck your CPU due to persistent processes. If this happens, your whole server could go down.

P3 Profiler

The breakdown from P3 Profiler helps you see which plugins are slowing down your website.

One plugin I highly recommend you use is P3 Profiler. Developed by GoDaddy, the plugin will show you exactly how much load time your plugins are adding. A breakdown is given which displays exactly how much load each plugin adds. It is the most effective way of seeing what plugins are slowing down your website.

4. Empty Your Trash

WordPress 2.9 introduced the WordPress trash system. Whenever content is deleted, be it a comment, post, page, media etc; it is sent to trash. From here, the content can either be restored or deleted permanently. It is effectively a fail-safe system that helps you recover anything that was deleted accidentally (in much the same way the recycling bin works in your computer).

Trash can take up a lot of unnecessary room in your website’s database. The bigger the database, the longer it is to retrieve information from it.

By default, WordPress will automatically delete trash after thirty days. This can be reduced by modifying the wp-config.php file. For example, you could reduce this to seven days by adding the following:

define ('EMPTY_TRASH_DAYS', 7);

You can completely disable the trash system by adding this to your wp-config.php file.

define ('EMPTY_TRASH_DAYS', 0);

5. Reduce Post Revisions, Drafts, Spam, Pingbacks and Trackbacks

It is not just trash that can needlessly increase the size of your database. All post types populate table rows with data. Therefore, it is important to regularly delete spam comments and unwanted pingbacks and trackbacks.

You should also be wary of the number of drafts and post revisions your website has stored. The WordPress revision system allows you to go back to older versions of articles, view them and restore them.

In addition to one autosave of your posts and pages, revisions will be generated each time you save your articles. This means that an article with ten revisions with take up ten times as much room on your database than the actual article that was published. As you can imagine, this increases the size of your database considerably.

Post Revisions

Post revisions can greatly increase the size of your database.

By default, WordPress will save an unlimited number of revisions, however this is generally not needed. It is better to reduce this limit to something more practical such as two or three. You can do this by adding the following code to your wp-config.php file:

define( 'WP_POST_REVISIONS', 3 );

Alternatively, you can completely disable the post revision system by adding the code below to your wp-config.php file. From a blogger’s perspective, this is not an optimal set up as post revisions are very useful, however many website owners have taken this step to ensure their database runs more efficiently.

define( 'WP_POST_REVISIONS', false );

A more practical way of cleaning your WordPress database is to use WP Optimize. The plugin can automatically remove auto-drafts, spam comments, trackbacks and more. WP-DBManager is also a good solution for optimizing your database.

6. Optimize Your Images for the Web

Images can help break up long pieces of text and can help your articles be shared more frequently on social media services; however they also take up a lot of storage. Therefore, pages that contain many images can take a long time to load.

It is therefore in your best interests to optimise your images for the internet before you upload them to your website. Most photo editing applications, such as Photoshop, allow you to do this via the “Save for Web” option.

A good plugin to optimize images that have already been uploaded is WP Smush.it. It utitlizes the Smush.it API to optimize JPEG images, strip meta data from JPEGs and convert GIF images to PNG. You should however be aware that the plugin uses up a lot of resources when it is converting images, therefore your website may be slow whilst it is running.

If you do not want to sacrifice image quality, check out Lazy Load. The plugin ensures that images are only loaded when the area becomes visible to the user. This will greatly reduce page loading times.

7. Choose Your Advertisements Wisely

Be conscious about the type of advertisements you add to your website. The most efficient way of promoting a product or service on your website (from a website performance perspective) is to link directly to the page using an image that has been optimized for the web. You can take this one step further and link using text links instead.

Adding advertisements from third-party advertising networks can increase loading times due to the calls that are made to external servers. Even localised ad tracking scripts can hurt performance. For example, the popular ad rotation plugin OIO publisher has a bad reputation for increasing page loading times.

Of course, advertisements are necessary for most websites to survive, therefore you need to strive for the right balance between speed and income. If you optimize all other areas of your website design, a few advertisements will not be too damaging. Just be sure you are fully aware of what load each advertisement adds to your website by testing your website speed before and after adding the advertisement.

8. Consider Not Using Official Social Media Buttons & Widgets

For most website owners, social media traffic is second only to search engine traffic. Which is why social media sharing buttons are so prominent on website designs.

Official sharing buttons are popular as they denote the number of shares a page has had. Unfortunately, official sharing buttons from services such as Facebook and Twitter can increase loading times immensely due to the calls they make to external services. I previously displayed sharing buttons above and below articles for Facebook, Google+ and Twitter. This added a whopping 500KB to my pages.

By simply changing to text links or locally stored social media images, you could save reduce your page size by up to one megabyte.

9. Enable Gzip Compression

Gzip compression allows a website page to be transferred to a browser at up to 70% of its original size. The browser will then decompress the page and display it to the user.

Gzip Compression

Gzip compression is easy to enable in WordPress.

Gzip can be enabled via the WordPress options page. You can find this page at www.yourwebsite.com/wp-admin/options.php. To enable Gzip, simply change the value of the Gzip field from 0 to 1.

10. Minify and Combine CSS and Javascript

Each call to your CSS and Javascript files is an HTTP request. This means that when someone visits your web page, their computer sends a request for a file and then the server sends it back. The more requests there are to your server, the longer it will take for your pages to load.

The PHP5 application Minify combines multiple CSS and Javascript files into a single file. This greatly reduces the number of HTTP requests. The application also removes unnecessary whitespace and comments.

There are a number of WordPress plugins available that will minify your CSS and Javascript files. I recommend using either WP Minify or Better WordPress Minify.

11. Enable Browser Caching

Some of the largest files on your website rarely change. This includes CSS files, Javascript files, your website logo etc. One way to take advantage of this is to enable browser caching.

Browser caching allows internet users to speed up the loading time of their favourite websites by storing a cached copy of your website locally. This reduces calls to your server and saves the user from downloading the same files again.

You can enable browser caching by adding the following code to your .htaccess file:

## EXPIRES CACHING ##
<IfModule mod_expires.c>
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"
ExpiresDefault "access 1 month"
</IfModule>
## EXPIRES CACHING ##

The code above specifies how long a particular file type should be stored. Files will simply be downloaded again if they have expired.

12. Install a Cache Plugin

Caching plugins allow you to publish static HTML files instead of dynamic files. This greatly reduces the time a page takes to load as there are no PHP or MySQL commands to execute.

Additional caching features include minification, caching of feeds, Gzipping, Content Delivery Network (CDN) support, and much more.

Caching your pages is one of the most effective ways of improving your page loading times, with many plugins promising an improvement of at least ten times. Popular caching plugins include WP Super Cache, W3 Total Cache and WP Fastest Cache. All three plugins are available free.

W3 Total Cache

W3 Total Cache is one of the most popular caching plugins available for WordPress.

13. Use a Content Delivery Network

Your website is hosted in a data center somewhere in the world. The further a visitor is from the location of your data center, the longer it takes for your web pages to load.

Content Delivery Networks (CDN) address this issue by utilizing dozens of data centers around the world. They take the heavy work away from your hosting company by hosting your images, CSS and Javascript files, and serving these files to visitors from the closest location to them. Seconds can be taken away from your page loading times because of this.

Popular content delivery networks include MaxCDN, Amazon CloudFront and CloudFlare. The cost of these services vary according to how much bandwidth your website uses. For example, MaxCDN’s cheapest plan costs $9 per month for 100GB of bandwidth.

Overview

Optimizing your website is no longer an option. With search engines placing so much importance on the speed of web pages, it is vital to your website’s success to have fast loading web pages.

A lot of people wrongly assume that you need to be an expert to optimize a WordPress website. Nothing could be further from the truth. 99% of optimizing your website correctly is following good practices and taking advantage of caching and content delivery networks.

I hope you have enjoyed this tutorial on optimization. If so, I encourage you to subscribe to the Elegant Themes blog so that you get updated about our latest articles.

183 Comments

  1. Hi Kevin
    Enable Gzip Compression looks pretty easy to implement b ut can it cause problems with some browsers?

    Enable Browser Caching also looks like one to try.

    • These shouldn’t cause any problems. Enabling GZIP and browser caching is something that I would recommend for everyone.

      • I’ve seen gzip compression in CPanel… is this the same as setting it inside WordPress?

          • gzip compression should be one if the first things all website owners look to as it is so easy and produces amazing results (77% compression on homepage of our site for example). However the service on the link above is only in beta mode and it shows – it considers second level domains to be invalid ! Use instead http://www.whatsmyip.org/http-compression-test for simple gzip test

      • Enabling browser caching causes conflicts with the Woo Commerce cart. I am using styleshop theme and the cart does not work properly once it’s enabled

        • Kevin Muldoon

          Sorry to hear that. I have tested pretty much every ecommerce plugin for WordPress but I have never used it for a live website (I did run an online shop years ago but we used CS Cart).

          Obviously your store’s cart is more important than browser caching, though you can still optimize your website in other ways.

    • Kevin Muldoon

      Sorry Keith. I should have clarified that in my article.

      Gzip is supported by all modern browsers including mobile browsers. Search engines such as Google encourage website owners to use it. :)

      • i have searched all the option files and the search returns string not found in any of them with a search for gzip with ignore case set.
        using WP 3.8.1

        Bj

    • @Keith – GZIP can cause issues on some old browsers. But after year of 2000 all browsers support this compression.

      Just before 4 weeks i have some weird issue on mine blog, because caching system remove cache headers and return compressed stream. All browsers except Firefox render perfect, just Firefox didn’t load CSS-es and everything being weird there.

  2. Use Jpegmini.com for optimizing jpg files. A true diet!

    • Kevin Muldoon

      Great Suggestion Mohsen. I’ve came across that before but forgot to include it. I tend to use the “Save for Web” option in PhotoShop myself.

      • For linux users I suggest jpegtran and optipng : both are non-destructive and makes you gain from 15 to 25% the size of the original file. Pretty awesome :)

        • @tom, I have used SMUSH and its very nice.. really want to try jpedtran.. my only question.. I don’t wanna reduce the quality of my images..

  3. Great post! I was literally just Googling for stuff like this. I have a question: Is there a difference between 10 and 11?

    • Kevin Muldoon

      Yes there is a difference.

      Say your website calls ten CSS and Javascripts in the header. Each visitor has to collect these files from your server. Each call for a file is an http request and each http request adds to your page loading time.

      By combining these files into say two files, you have greatly reduced the number of http requests. And in turn, your page loading time improves.

      You can also improve time by placing CSS at the top of your pages and Javascript at the bottom. This ensures the design loads correctly first.

      Now imagine that same visitor. He has now downloaded those combined files as well as your website images etc. When he returns to your website, he does not need to download these files again unless they have been changed; as the files are already stored locally.

      So minify reduces the number of requests that are needed to collect files and browser caching allows the visitor to use the files he has already downloaded :)

      • Sorry, I meant to say 11 and 12. None of those caching plugins handle browser caching?

        • Kevin Muldoon

          Yes, many caching plugins, such as W3 Total Caching, allow you to use browser caching.

          I made a point of listing browser caching as a separate item as many people use browser caching but don’t like using caching plugins.

          Plugins such as W3 allow you to do many things such as integrate CDN’s, enable minify etc. :)

  4. Great tips, Kevin and ET crew!

    I didn’t know some plugins, so I’ll check them out!

    The “P3 Profiler” plugin is a feature that I was searching for a long time: thanks!

    Best!

    • Kevin Muldoon

      Yeah it’s a great plugin. I reviewed it when it first came out. Unfortunately, GoDaddy don’t seem to be actively updating the plugin anymore, however it still works with the latest version of WordPress :)

    • Kevin Muldoon

      W3 is a fantastic plugin. It takes a lot of effort into improving page loading times as it can do additional tasks such as browser caching.

      EWWW Image Optimizer seems really good. I’ll need to make a note of that.

  5. Great tips for my WordPress clients. Thank you. I learned several new ones!

  6. Good post, a couple more notes:

    1. Make sure in-admin file editing is disabled. Most hacked wordpress sites are hacked due to this dreadful feature being enabled.

    add to wp-config.php: define(‘DISALLOW_FILE_EDIT’, true);

    2. Regarding gzip: this is a double edged sword, it’s supposed to speed things up due to faster page downloading time. But it often ends up lengthening the page *loading* time. The data needs to be compressed server side, and decompressed client side. This is a burden on the CPU.

    Hosts (especially shared accounts) are short on CPU more than they are short or anything else. So much so that many shared plans don’t even allow gzip compression.

    And client browsers can also be slower on older machines, weak mobiles etc.

    So while this may improve pure download speed, pageload may actually be longer, resulting in a poorer user experience.

    Do some testing and consider the strength of your hosting environment and your typical audience (tech savvy users will mostly use newer machines, grandma and grandpa may often use grandson’s first computer from 15 years ago, etc).

    • Kevin Muldoon

      Great tip about file editing Gigi. I must admit that’s something I have been lazy about in the past because I like the convenience of editing files online.

      I wasn’t aware that Gzip could actually slow down a website. I knew that it would require a little more CPU time, however I didn’t think it would be too much.

      But it does make sense that Shared hosting plans would disallow this. They are notorious for disabling features and not allowing things such as file upload limits to be increased.

    • Hi Gigi,

      Sounds like you know what you are talking about. So what hosting company do you recommend?

      Hi Kevin,
      Really useful article. Right now my site is running incredibly slow.I have done a few of these tasks and still no change. Ugh.

      • For shared hosting Hostgator (you can use the affiliate link ElegantThemes show in your account page) has proven to be just fine for me and for many others.

        Bluehost is popular but not recommended due to their strange control panel quirks (you can see error messages from every single website on your server, huge security flaw!)

        Also generally avoid hosting at your registrar (godaddy hosting, namecheap hosting etc), these are unusually slow hosts. For registering domains these 2 are fine.

    • Hi Gigi,
      For a beginner, how do you go about #1 in your comment to prevent hacking? Thanks.

      • Typically you would type it in wp-config.php (before the last line which is “require_once(…..”.

        To edit wp-config.php you need to use an FTP client or try to edit it through your hosting control panel’s file manager (less recommended).

        You can Google an endless amounts of tutorials about this :)

        All the best,
        Gigi

    • Thank you, Gigi. You just explained why Hostgator hated on me when I tried to enable gzip. It threw up a 500 internal server error.

  7. Thanks for this info. Plugins take more space nowadays, so optimizing sites with these tips is very welcome. Thanks again.

  8. Great article, happy to see I follow pretty much all of these options.

    Only one I would watch out for is #10 Minify and Combine CSS and Javascript.

    This can cause issues with your website depending on the template, test it on a local development site before doing so on a live site.

    Also #1 Slowdown in my books , Stupid Image sizes!

    • Kevin Muldoon

      Thanks for the tip. I hadn’t heard about that.

      For me, the key is always testing your page loading time before and after you make any major change to your website; particularly changes related to speed improvement.

      I used to be bad with images and publish posts with hundreds of images. Crazy when I think about it. For articles with hundreds of images, the Lazy Load plugin is a godsend.

  9. Excellent WordPress optimization tips, nice! Would you recommend sprite images to speed up the site as well especially using social buttons? Thanks

    • Kevin Muldoon

      Sprite images is something I considered adding to the article. At the very least, I should have mentioned it under the WordPress theme category, as WordPress theme designers are using it to speed up their designs. I did a test with sprite images a couple of months ago and noticed minor improvements on my own website. If I call recall, I saved about 50-100kb. Which is pretty good.

      Are you talking about using sprites for social media buttons?

      There were a lot of techniques that I left out. I simply couldn’t list all techniques. I’m actually writing a book about optimizing WordPress at the moment so I’ve done a lot of research into the subject over the last six months.

      • Hey Kevin,
        A saving of up to 100kb on a webpage that’s 200kb is size would be great result… however, a saving 100kb of a webpage that’s 100mb wouldn’t be worthy the effort.. or would it?.

        Overall, mate that’s a Great write up! For me it’s been booked marked for continuous referring to.
        (from a n00bs perspective <-that's me)

        Cheers'

        • Kevin Muldoon

          Whilst you might find a few minimalist text only blogs that are only 100kb in size, you’ll find that most websites are between 1mb and 3mb in size.

          There are probably some portfolio and art style websites that are large in size due to flash or an auto-playing video; however I’d love to see a web page that is 100mb in size. :)

          Glad you liked the article :)

      • Hi Kevin, when is your book coming out and where can I buy a copy from? Thanks.

        • Kevin Muldoon

          Hi James,

          It has been put on the backburner at the moment for a number of reasons.

          Firstly, because I do a lot of freelance blogging. Secondly, because I also have a lot of work on my own projects.

          I also need to rewrite it as I had initially wrote the book from the perspective of a case study, but I am changing it to be a general guide.

          If I can manage my schedule a bit better then I should be able to devote a day or so to it every week and work towards finishing it.

          At the moment I am looking for writers to lighten my load on my own blog. That will help free up some time :)

          Kevin

  10. Great article – bookmarked!

  11. This should be on the front page of the Codex. Very nice. Thanks

    • Kevin Muldoon

      Appreciate the suggestion. The list is far from complete. There are so many other techniques out there, but it’s hard to list them all. :)

  12. Hi, do pages built with Elegant Builder have slower response than the ones using WP edit panel? Thanks.

  13. Pour le cache j’utilise un plugin fr “wprocket” très puissant et compile le css et java

  14. This is probably the most helpful blog entry for Elegant Design. Well done.

    Now back to “business”. I would LOVE to see the Divi’s page builder getting bundled as a PLUGIN, so we can use it with all of our themes. If you do this, most members will upgrade their Personal memberships, to the Developer’s membership, so it will be a win-win for all.

  15. Thank you! Thank you! Thank you! – These are great tips and solutions to keep handy – I have saved, printed, bookmarked this page in 3 locations to ensure I refer to it each and every time I setup a site. ET keeps giving solutions and advise worth its weight in gold!

    • Kevin Muldoon

      Glad you like the post A1. We have some good posts planned for the next few weeks so be sure to subscribe :)

  16. Great article. I implement quite a few of these on some of my sites, but I really should make it best practice. Some of the plugins are new to me and sound really interesting. Time to take a look…

    Thanks.

  17. Great tips,
    The best tool to Minify CSS and general optimization for me is use gtmetrix-dot-com, this tell you what need optimize and give you an optimized version of the css and image files. Also give useful info about optimization like gzip, headers, CDN, etc.
    Also optimize the db occasionally is also necessary.

  18. Great tips, Kevin, thanks a lot!

    Just a q for the non-techs amoung us; where do we put in the browser caching snippet in the .htaccess file?

    • Kevin Muldoon

      You can view your .htaccess file via a file manager or file transfer protocol client (such as FileZilla) at http://www.yourwebsite.com/.htaccess. Make sure that you have chosen hidden files to be visible.

      Download the file and open it in a text editor. Then add the necessary code and reupload the file. Be sure to keep a backup of your existing .htaccess file before changing the file. The .htaccess file can mess your website up with just one character of out place. But if you make a backup, nothing can go wrong.

      Let me know if you are unsure :)

      Kevin

      • I was wondering where in the about 19 lines in the file I should put the snippet?

        • Kevin Muldoon

          You can just put it at the end. Someone can correct me on this, though I’m 99% sure that the order does not matter with .htaccess.

          • Great, thanks Kevin :-)

  19. Great recommendations. Thanks. One quick one though – for those of us not entirely familiar with the back-end of things, where or how can we locate these wp-config.php and .htaccess files?

  20. Thanks Kevin, some really useful insights! Now time to make some adjustments… :)

  21. Very insightful and useful post! This is all most WordPress sites will ever need to know about optimising page load times.

    Thanks!
    james

  22. Hey KevKev,

    Great article! Question.

    Do you have any recommendations for hosting companies? I’ve been with Godaddy in the past, but am looking to change is there are better services out there.

    Thanks.

    Kraymer

    • Kevin Muldoon

      Personally, I would never recommend anyone using the same company for hosting and domains. Plus, whilst GoDaddy, and other domain companies, offer hosting, they aren’t exactly known for being great at it.

      My advice to you would be to go to somewhere like webhostingtalk.com. Start a thread and explain to people what your requirements are. You will get good recommendations there.

      • Great, Thanks!

        I’ll definitely be stopping by webhostingtalk.com.

        Kraymer

  23. Amazing post Kevin! Thanks for a lot of great tips for optimizing a website.

  24. Great article! Very useful tips! I will give them a try.

  25. Excellent article. It is very interesting to be published more often this type of advice. This will help improve the community. Post topics as Divi has been a breakthrough but also must speak more often of subjects and SEO optimization.

    Thanks to Nick and his team and congratulations to Kevin Muldoon.

    Greetings from Spain

    • Kevin Muldoon

      Gracias Adrian. Soy feliz que le gustó el artículo :)

      Nick has some fantastic plans for the blog. There’s going to be a lot of great content published there over the next few months.

  26. Hi Kevin

    Nice post the only thing i cant seem to find is the gzip option in the /wp-admin/option.php

    • Kevin Muldoon

      Check with your host Luke. Your host may have disabled it. Another commenter here mentioned that shared hosting plans sometimes have this feature disabled (which is unfortunate).

      • Ok Kevin thanks i thought you meant in the php file i found the php file but couldnt find the gzip value.

  27. I knew there was another reason why I renewed my subscriptions. Another great article.

    Thanks for sharing

    • Kevin Muldoon

      Glad you liked the post Gilles. Be sure to subscribe to updates for the blog :)

  28. Thanks for a great article. Well written. Relevant. Easy to follow. Nice job!

  29. amazing…! love this article :D

    • Kevin Muldoon

      Thanks Zaf. Be sure to subscribe to the Elegant Themes blog for updates to our latest articles. :)

  30. I could really feel some noticeable increase in the page loads speed in my wordpress theme after doing the GS Compression tip… thx so much guys!

  31. Wonderful post for all of us who knew performance was important but didn’t know where to begin.

    Please keep us posted on additional topics & techniques and your upcoming book.

    Thanks!

    • Kevin Muldoon

      Thanks Exelexys. You can subscribe to the Elegant Themes blog via RSS, Google+, Twitter and Facebook :)

  32. Another optimisation tip would be to reduce the load on your server by blocking all the useless bots out there.
    And if you believe that a robots.txt will keep the bad bots out, you are believing in the tooth-fairy …
    I have seen up to 65% of the traffic to be bots of all sorts that don’t help and by blocking these your server stops working hard for the benefit of the bots. A lot of these bots are trawling your site to grab information that they sell to their customers. So we are working for these for free …
    Incapsula.com will automatically block bad bots, allow access to Google, Bing etc. and also speed up the site.
    Some days, bots like Yandex, Baidu and others come from different countries to circumvent country blocks.
    I don’t have clients in China, Russia, Ukraine, Indonesia, Turkey, Romania etc and so by blocking these countries in the Incapsula panel, I automatically save bandwidth and potential hassles. Nothing against the people there, but looking at the server logs, that is where most of the hacking attempts are from in my case, so I’d rather just block it. Obviously this sort of blocking is not 100% fool proof but it works in most of the cases.

    • Kevin Muldoon

      I agreed about robots.txt. It is merely a suggestion to search engines as to what they should do. They can, and will, simply index whatever they want.

  33. Hello Kevin. Thanks a lot for this great article! So many tips to learn and use!
    Two quick questions: 1) My shared server support just told me the server is not compiling mod-expires. Any other way to enable the visitor’s browser caching?
    2) My server support recommended using either the Cache Plugin or CloudFlare Service (I would use CloudFlare free subscriptions). I’m in Brazil, as the hosting server and most of my visitors. Would using a CDN better/same as using a Cache Plugin? Would a cache plugin take much disk space? Please share more wisdom with us. ;-)

    • Kevin Muldoon

      Hi VT,

      Glad you liked the article.

      1. I am not sure how browser caching could work without the host being configured correctly to support it. I may be wrong about this though. Perhaps another reader here can help me with this question as I can’t confirm that with conviction :)

      2. Well, I just have to say, I would not say I’m an expert on this subject. I just know enough of the technical side of things to get by. I don’t know the ins and outs of how a lot of these techniques work (which I think in many ways helps me as a blogger as it allows me to explain things from a “normal” person’s point of view).

      For me, it was all about trial and error. Some people use CDN’s, some people use caching, some people use both. And there are others that do not use CDN’s or caching techniques yet they have optimised their websites using other optimization practices.

      I used CloudFlare once in the past with a blog I sold a few years ago. It seemed good at first but I was put off when there was a problem with it and my website was down for several hours. After that, I was hesitant in using them again. I should have perhaps persevered, but having my website going down after using the service was very off-putting.

      However, I know people that swear by CloudFlare, so I suspect I was just unlucky. I would recommend contacting CloudFlare directly and asking them some questions. Could be worth giving them a try. Again, I would recommend testing your website before and after so that you have a true idea about how much your website speed has improved.

      :)

  34. I change the gzip to 1 from 0 and my site went down, showing error 500 server, why?

    • Kevin Muldoon

      I am not 100% sure. Can you confirm with your host that they support Gzip.

  35. Thanks for sharing. Very handy to know ;)

  36. Hi Kevin,

    Thank you for this great article
    Very useful

    Have a nice day!
    Groeten uit Holland ;-)

  37. Oooohhhhh…. yes! yes! Yes!!!! :) Thank You!
    finally someone speaks clearly and in an understandable way. On the web, many write so much, without transmitting anything.

    Thanks.

    • Kevin Muldoon

      Thanks Costruzioni. I’m glad you could follow the article easily. I’m not a technical guy myself, which helps me when explaining things.

  38. Excellent tips. I have gone through many WordPress page load speed tutorial but no as deep as this one.

    Thanks for sharing it.

  39. Really Cool Post

  40. Hi Kevin! Great article! I’ve implemented smush-it, lazy load, WP-optimize, WP-minify and WP Super Cache.

    I am very new to optimization and I had a maintenance mode / splash page on the main url when I set all this up… now for some reason, despite taking off the splash page / disabling maintenance mode, the home page is stuck or maybe cached to that.

    After doing major changes, how do I ensure the site is showing properly with these cached plugins?

    Thx again!

    • Kevin Muldoon

      Hi Sara,

      Most caching plugins have an option to clear cache. This should refresh the page and removed the old cached version.

      I recommend giving that a try first :)

      Kevin

  41. Great article. Some really good and quick tips here.

    In experience, some themes tend to be very badly optimised code wise and you should be really careful about the themes you install.

    S

    • Kevin Muldoon

      Agreed. If a theme is badly coded, you run the risk of errors and plugin clashes occurring.

  42. Great post! I found out by trial and error that the Facebook’s own plugin was really slowing me down, not only speed, but also you have to get involved in FB’s developer languages and a ton of other steps to take before it all works. Then do it all over for Twitter…. I found only 1 plugin that really syncs great with FB or twitter from Nextscripts: http://wordpress.org/plugins/social-networks-auto-poster-facebook-twitter-g/

    • Kevin Muldoon

      I have just been using the auto-publish feature inside JetPack (which, admittedly, can slow down websites). I have heard good things about Nextscripts. Will need to keep it in mind for future.

  43. I installed BetterWordpress minify lat night and it crashed my site…guessing some kind of conflict. My kind webhost tech guys had to sort my site out as i couldn’t access it at all

    • Kevin Muldoon

      Hi Sandy,

      Sorry to hear that but glad your hosting company was able to resolve it.

      As a reminder, always ensure you are backing your website up daily so that something like this will not risk your website being down for an extended length of time.

      Kevin

      • i have the same problem so i disable the plugin and the website work again, but i know where is the problem, but i just dont fix it yet, the problem is a file on the cache, it ask permision to 777 :/ it is aproblem with godady, so i grant permision to all the plugin folder, but it dosnt fix it :/

  44. Media Library question: I thought “delete permanently” meant what it said. Are my images being stored somewhere in a trash bin, or do these get earmarked to “Unattached”? Hate that folder, it does contain images that are indeed attached, just not WP conventionally?

    P.S. This is one of the best posts ever, thank you so much.

    • Kevin Muldoon

      Hi Jan,

      I just checked this myself on my test blog. If you go to your media page and click on delete permanently, the item will not be sent to trash, it will be deleted.

      Kevin

      • Thanks Kevin! Phew, we are very image heavy on our site and clients.

        Already completed about 3 things on your list I had not done on our site, it’s already loading about 3x faster.

        THANK YOU!

  45. Kevin!
    I am BRAND NEW to wordpress. I did a lot of research prior to jumping in and I chose Elegant Themes. In the last couple of weeks I have learned SO much and it has been a fun learning curve. The support team is quick and amazing. And the blogs are fantastic. Yours was a huge eye-opener. I feel like going for a long run to process everything you just wrote…. only it is -31 C out there…. so I’ll just keep reading the posts here. Great work. Thank-you! Andi.

    • Kevin Muldoon

      Wow. -31 degrees is crazy.

      I thought me and my friends were being dedicated runners by running in -2. :)

  46. FYI:

    The option to enable gzip compression was removed in WordPress 2.5
    the logic being that Apache could handle it much more efficiently than PHP.

    • The gzipcompression option still exists in the options panel mentioned in the post.

  47. Enable Browser Caching using method 11 does not work properly with the woo commerce cart. My cart (site based on styleshop theme) started behaving weirdly, sometimes the added products would remain in the cart even after removing, and sometimes even after adding several products they would not appear in the cart.

    • Kevin Muldoon

      That does make sense as an eCommerce website has to be dynamic. Therefore, it may be in your best interests not to use browser caching.

  48. Simple tips are the best tips! Thanks! : )

  49. Hi Kevin,

    Thanks for a useful article! I am new to wordpress and I am wondering is there a way to backup my wordpress files and MySQL database to Dropbox?

    Thanks a lot,

    David

    • Kevin Muldoon

      Hi David,

      There are some good free backup plugins on WordPress.org that allow you to do this. I haven’t used any personally.

      Kevin

  50. I’ve been thinking of changing my wordpress theme to a faster one. But the problem is I don’t know which one I can trust.

    Is it possible for you to suggest some themes that have been optimized for desktops, tablets and mobile devices?

    Thanks.

    • Kevin Muldoon

      If you already have an Elegant Themes membership, I recommend activating a few different designs and comparing speeds.

      Unfortunately, I do not have time to recommend themes. Finding the right design can be a timely pursuit. In the past, I’ve spent days looking for the right theme.

  51. Great article again Kevin. I would however recommend being really cautious about plug-ins that confess to having ‘experimental’ features. Looking at threads addressing WP-Optimizer, the author themselves have recommended caution.

    Loving the blogs.

  52. Kevin Muldoon

    Glad you liked the article Gary.

    I agree about being cautious. I guess you always need to be cautious when using any plugin, but particularly those whose job is to change the database frequently.

  53. Tip no 1 is great. Once our company bought cheapest hosting on none server and 3 months of our job gone away.

    Thanks again

    Arthur

  54. It might be interesting to also comment and can affect performance and load time using a child theme.

    • Kevin Muldoon

      Hi Joan,

      I’m not sure what you mean. Can you clarify your point?

      Kevin

  55. The tips are great concepts that will improve our WordPress functionality and flexibility .

  56. When I add
    define( ‘WP_POST_REVISIONS’, 3 );
    in wp-config.php archive, the WP administration panel produces “the white page error”, for example, when I remove a spam comment or empty the trash :(

    • Kevin Muldoon

      That should not happen Mariana. Are you sure that is what caused it and not a plugin or modification of your theme?

      To be sure, I would revert back to your older wp-config.php file and then try again. :)

  57. Hello to all, is there any way to make it work the Cache and minify plugin, on godaddy?, i guess all is about the chmod 777

  58. Brilliant post, really useful. WP Minify has actually slowed my website down by 200% though!

    Load speed was 1.3 seconds without it and 3.9 seconds with it!

  59. When you select a wordpress theme for your website, make sure you test it with Google PageSpeed Insights. Choose a them which has the ability to load faster than others. This will help you to optimize your website.

    You can also use services like redis, Memcached, Amazon S3 to optimise your websites performance.

    Kevin, I wanted to know if I have a shared server, will it affect my website’s performance?

    • Kevin Muldoon

      Great advice Adrian.

      A shared server will affect your website’s performance a little as you are hosting your website on a server with hundreds of other websites. Your response times will probably be slower as a result of this.

      • Hey Kevin,

        I agree with you. Shared severs also have security risk tied with them. The webmasters should go for dedicated servers for the performance website likle redis, Memcached, etc

  60. What you said made a lot of sense. But, what about this?
    what if you were to create a killer title? I mean, I don’t wish to tell
    you how to run your website, but what if you added a headline that grabbed folk’s attention?

    I mean Optimize Your WordPress Website Using These Simple Tips | Elegant
    Themes Blog is kinda boring. You could peek at Yahoo’s
    front page and see how they create news titles to grab viewers interested.

    You might try adding a video or a related picture or two to grab people interested about everything’ve written.
    In my opinion, it might make your posts a little livelier.

    • Kevin Muldoon

      I do realise the importance of a good post title, though I am the first to admit that the title is not always my first priority. I usually use practical titles that explain exactly what the post is about. :)

  61. Another quick tip for you, guys , is to use the built-in WordPress permalink field at the top of the editing page to revise your links before you publish them.
    then you eliminate unnecessary words, and make intelligent use of keywords in your description.

    Keep the good work up, buddy!

    XeonTek Innovation Inside

  62. Hi Kevin. When I enable Browser Caching I opened .htaccess file and it contained the following texts.:

    # BEGIN WordPress

    # END WordPress

    I put the code between them? Or just the codes mentioned in the blog?

    Thanks.

    • Kevin Muldoon

      No. Place the code outside that text. The text in between is what WordPress updates during automatic updates etc.

  63. Great tips found, this gonna help me to optimize my blog.

  64. Wow, these tricks actually worked for me. My site’s loading time is reduced upto the maximum extent. Really, i must say, your tips are great and easy to apply. Thanks a lot once again.

  65. How does using a Cache plugin (like WP Super Cache) and a CDN (like Cloudflare) work, though? Don’t they both cache your server and files? Am I missing something here?

  66. I think the big one that people forget to do is enabling browser caching. For some sites that I’ve redone, this can dramatically increase the load time of pages.

  67. Thanks man !! Past few hrs ago really struggling wordpress speed for personal blog. I go through Google Search Engine and search. I got your website.

    Really help and make sure above mentioned are topics are new for me and optimize too.

  68. Great article! I followed your advice and installed W3 Total Cache, tested my plugins with P3, nixed the hogs, optimized my images and then rechecked my load times on gtmetrix … went from a 66 to a 91!

    Thanks for the advice. New guy here and this was a HUGE article!

  69. These are tips that have a very significant impact Yag for my website.
    Speed ​​website is part of the user experience
    thank you

  70. Excellent Tips Kevin!
    Actually the WP minify plugin creating conflict with cloudflare and W3 total cache plugin. it’s better use W3T minification or use just one. Firthermore WP optimize also better alternative for post revision cleanup.

    Disabling Statics plugins such as Jetpack Stats,Google Page Speed, Analytics plugin could save % of speed.

  71. It is so good, thanks for sharing very useful tips. I was very pleased to find this site and have bookmark this and will certainly be back.
    Thanks.

  72. Thanks Kevin! Great article!

  73. Wow! It is just for newbies as myself. Thank you kindly.

    Please advise what is the best to install plugins or add your code to .htaccess file to enable cashing. Also as I understood the following plugins must? WP Minify or Better WordPress Minify. Please advise Gzip enable website http://www.yourwebsite.com/wp-admin/options.php does not work putting my website. Thank so much for being available on the web. Warmly, Michael.

  74. Thanks for the useful tips, finally my website aren’t taking forever to load ;)
    p.s. your MaxCDN link leads to empty (almost) page

  75. Check out also this solution http://www.incapsula.com/ that offers both protection and optimization, lots of great features.

  76. Some good tips, however, in general this statement is wrong, unless I’m misinterpreting it “The bigger the database, the longer it is to retrieve information from it.”.

    That’s one reason we use databases – size doesn’t matter ( for the most part ) when it comes to speed, unless you’re dealing with really huge amounts of data.

  77. Do you have any tips to increase speed using a blogspot blog.
    Thank you for sharing

  78. Great blog. Optimizing a word press site is simple to use and you have various functions to perform with your website. Thanks for sharing a informative blog.

  79. I have used W3 Total Cache and WP Super Cache before, but I recently switched to Hyper Cache which seems (to me at least) to work as well and which is a lot easier to set up, no messing with the .htaccess file.

    This is a real bonus if you are using a security plugin like BulletProofSecurity which itself adds a lot to .htaccess.

    Any thoughts on Hyper Cache?

  80. Thanks for sharing, it’s important to find a good host, doing some research helps, because it will affect load time for your site. WordPress is such a wonderful tool, I wish more sites would take advantage of it.

  81. My CPU usage on my shared hosting plan has been too high, and my hosting company is warning me that I can be suspended soon. They can’t offer much insight what the issue is, though. I am trying everything to desperately fix it! They mentioned that themes can cause issues. I currently use Divi theme, though. I don’t think that should be the issue, but any insight there would be helpful.

    Also, if I turn off revisions completely then only the most recent draft will be saved, correct? I didn’t even realize that drafts are autosaved like that!

    I know this post is from the beginning of the year, but I really hope someone can reply and offer some help! Thank you!

  82. Very useful article Kevin, I also like to recommend using WP-Optimize to fix all sorts of Trash, Revisions and other database problems :) no need to go to wp-config

Leave a Reply

Your email address will not be published. Required fields are marked *

Current ye@r *

Join 261,586 Happy Customers And Get Access To Our Entire Collection Of 87 Beautiful Themes For The Price Of One

We offer a 30 Day Money Back Guarantee, so joining is risk-free!

Sign Up Today

Pin It on Pinterest

Share This