Speed up WordPress

Posted on 13th July, 2013 7 Comments

This is something that I add to all my sites, it will increase the load time. Check your site now on http://gtmetrix.com/. < This site gives you a breakdown of your sites performance and will show you the areas that you need to improve on. This page is dedicated to improving your sites performance, which in turn keeps readers happy. This is why this snippet is part of my must have snips. It increased my sites performance by about 6%.

Add this above everything in the header.php of your theme, add it right at the very top of your document. What this does is a little bit of magic, it determines what type of content encoding the browser will accept (“gzip”, “deflate” or none at all) and will return its output accordingly.

<?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); ?>

After you check again with gtmetrix.
You’re aiming for all green bars really, anything that is red should be sorted out pretty quickly. Hopefully now you should see a change in your performance.

There are still some other things you can do to help with the performance…

gtmetrix

Setting the header expires on files and images in your .htaccess file.

You’ll need to access your web host to do this, but that really is simple.
Basically you have two choices; You can do this with an FTP client or through your websites cPanel, you would have been given your login details for the cpanel and ftp when you registered with your web host, so check your emails for those.

To access the cpanel add /cpanel to your domain name. ex:http://mydomain.com/cpanel

Onto the htaccess…

Once you have your .htaccess file, create a backup. ‘Copy & paste’ the file to your desktop and rename it as .htaccess-backup, We’re doing this just in case you make a mistake, you’ll just be able to remove the -backup from the name and re-add the .htaccess file back to your server.

Open up your .htaccess file, and add this below any other content that’s in this document.

### Set Expires Headers ###


# Enable Expirations
ExpiresActive On

# Default Directive
ExpiresDefault "access plus 1 month"

# Favicon
ExpiresByType image/x-icon "access plus 1 year”

# Images
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"

# CSS
ExpiresByType text/css "access 1 month”

# JavaScript
ExpiresByType application/javascript "access plus 1 year"

For more on the htaccess file and WordPress security click here

Comments

To preserve code added to a comment you can wrap your code in short tags
by using [square brackets]:

  1. PHP use - [php] <?php code here ?> [/php]
  2. CSS use - [css] #code-here {} [/css]
  3. HTML use - [html] <div> code here </div> [/html]
  4. JS use - [js] $(".codeHere") [/js]

Jerbkofhfg

12th, Oct, 20

You want to know:
What is Admitad?
It is a network that helps both publishers and advertisers to establish mutually beneficial cooperation. We will provide you with a wide range of ad creatives, statistics, technical support, various additional services and will make everything so that you have a decent income.

You will surely ask:
«Why Admitad is so good?»

Quick payments
Withdraw money via WebMoney within 5 minutes or withdraw your earnings via bank or PayPal.
Honest cooperation
We do not charge fees for withdrawals, but instead share secrets how to earn more money.
Bonus program
More than a hundred exclusive programs to Admitad publishers. The hardest-working affiliates receive bonuses and higher rates from advertisers.
The best tools
We provide widgets, ReTag container, product feeds, promo codes and other tools and technologies to increase your conversion rate and get maximum feedback from your audience.
.

LorenaBlairacife

17th, Oct, 20

10 guidelines to help you decide your relationship status

In today modern it to purchase it society, Casual relationships happen more often before couples settle in and /or down. This is all well and good as long as all parties are on the same page in regards to where every thing has become stands and where it may be going. I had conversations with guy friends where they vehemently denied the realization they had a girlfriend. My next question was to be able to, There any girls out there that will be upset to hear you say that? This inquiry was met with a dumbfounded look of distress and horror. bearing this in mind, I compiled a few useful tips to guide you through the murky waters of whether your relationship highway: Are you headed near Monogamyville or Singletown?

Monogamyville or you probably going to end up in a relationships

She left a toothbrush at household: Women are instinctual animals;They mark their territory by leaving little clues around your place to let other girls know that there is another female in the picture. I was once shocked to find that the lady friend of a former roommate purchased a box of tampons and left it in the restroom of our bachelor pad (Overdoing this method, absolutely yes!). If a pink brush magically appears in your medicine cabinet, best wishes! you then have a girlfriend.

Meet the parents: Living with parents who greet your guests at the door is one area, But if you had the proper introduction and sit down with your family, I think it is safe to say that your partnership just escalated from casual to official.

You speak daily: Even in today world of constant connectivity the cadence of communication will tell you a great deal about the level of interest or commitment to romantic relationship. If you converse commonplace whether through text, Email or not online telephone, Chances are good that things are escalating one stage further.

sleepovers: dropping off to sleep after a late night romp the odd time is one thing, But planning sleepovers in advance requires forethought and thing that goes beyond booty calls.

Travel companion: Travelling together can make or break even the longest of encounters, So if you gone [url=https://www.bestbrides.net/the-first-glance-at-charmdate-com/]charmdate.com reviews[/url] down that road and pair of you made it back unscathed, odds are good that at least one of you considers you to be a couple. issue. So if you been on more than a handful of dates and still have yet to meet point people in her life, You are likely on the not list.

Guest of honor: If the person who you believe to be your partner regularly attends events such as weddings or parties without bringing you along as a plus one, then chances are you may be the only one who thinks that you more than what you actually are.

The conversation: If neither of you have broached the subject of where every thing has become is going or about being sexually exclusive then the answer to whether you have a girlfriend is probably, virtually no.

month warrior: Life is busy and it can be veruy uncomfortable to juggle work, exercise session, Family and social events. If you dating someone who doesn make an effort to regularly see you in person over the course of multiple weekends, You likely aren opening into their list of priorities.

Home nice home: Their place may be a mess or they are having a spat with a roommate. If you been dating for a few weeks and have yet to see where they live then something is definitely amiss.

Leave a Comment

To preserve code added to a comment you can wrap your code in short tags
by using [square brackets]:

  1. PHP use - [php] <?php code here ?> [/php]
  2. CSS use - [css] #code-here {} [/css]
  3. HTML use - [html] <div> code here </div> [/html]
  4. JS use - [js] $(".codeHere") [/js]