Increase PageSpeed by Minimizing Request in WordPress

0
 Increase PageSpeed

Increase PageSpeed

Increase PageSpeed Tips

Increase PageSpeed Insights rankings of website matters much more now a days. To get higher PR for website there are few factor matter such as PageSpeed Insights Rank, Performance Grade from Pingdom, and Performance Scores from GTMetrix. To Make Your WordPress Ultrafast these number must have to consider.

1. Keep updated WordPress

Stay updated with the  latest version of WordPress  is very important. Not only for the performance of your site, but to prevent hacking and similar issues. In each update, generally, there are many performance enhancements.

WordPress developers release new with each update WordPress versionesporque further improved.

2. Eliminate unnecessary plugins and updates the others

If you are using more than 15 plugins in your blog, then you need to check if you really need them all. If you do not need them, delete them. Also make sure you keep the Plugins, they are updated to the latest version .

3. Optimize your Database

You’ll be surprised how much you can reduce the loading time of your site, just optimizing your database. You can do this manually or you can do it by Plugins.

If you want to do it the easy way, install the plugin  DB Optimize  or  Optimize WP . You can do this manually you must do the following:

  1. You must open the PHPMyAdmin database administrator data.
  2. Choose your databases.
  3. Clicking “Mark all / as” the bottom of the page.
  4. Choose the “Optimize table” drop-down list located next option.
  5. And presto!

4. Caches your Database

Queries to the database are made ​​every time a person visits your blog. The cache is vital to reduce the number of queries, also increase the speed of your blog. To minimize your queries to the database you will easily install the plugin  DB Cache Reloaded .

5. Disable and Delete Post Revisions

Post revisions were introduced from WordPress 2.6. but in reality they are useful when a blog is managed by several authors and serves to see the changes of an article and the date of the change or return an item to a previous version. However, this will make your database is full of reviews of articles, which makes it heavier. If you do not need this feature, you must add the following line to the file  config.php  from your WordPress installation:

define ( 'WP_POST_REVISIONS' , FALSE);

If you want to remove all revisions of your database you must run the following query:

DELETE a, b, c FROM wp_posts to
LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)
LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)
WHERE a.post_type = 'review' ;

6. Disable Hotlinking

Hotlinking, also known as bandwidth theft is when someone copy and paste the URL of your image by putting your pictures on your own site, which makes the load on your server up enough.

There are several ways around this by putting the following into the file  .htaccess , located in the root folder of your server, as follows:

#deshabilitar hotlinking of images
RewriteEngine on
RewriteCond% {HTTP_REFERER}! ^ $
RewriteCond% {HTTP_REFERER} ^ http (s): // (www .) Trazos-web.com [CN]?
RewriteCond% {HTTP_REFERER} ^ http (s): // (www .) Google.com [CN]?
RewriteCond% {HTTP_REFERER} ^ http (s): // (www .) Feeds2.feedburner.com/TrazosWeb [CN]?
RewriteRule (jpg | jpeg | png | gif) $ - [CN, F, L].

 

You can enable your feed, because otherwise your readers will not see any image feed.

7. Uses WordPress Plugin Cache

Using a cache plugin like  WP Super Cache  or  W3 Total Cache  makes a copy of your blog in html is saved and that this copy is the one that will show your readers. This greatly increases the loading speed of your website.

8. Optimize your Images

If you edit your images with Photoshop, always use the “par Web & Devices Save” option, or use some of the tools to optimize your photographs that I present below:

Online tools:

Desktop tools:

9. Compress your content

This is done through the .htaccess file in your root folder and allows you to compress most files in your blog (css, javascript, php, html and xhtml). There are two ways to do this depending on the version of Apache you have installed your blog, if the version of Apache 2.x is smaller, it is done by mod_gzip, as follows:

<IfModule mod_gzip.c>
Yes mod_gzip_on
Yes mod_gzip_dechunk
mod_gzip_item_include file (html |? txt | css | js | php | pl). $
mod_gzip_item_include cgi-script handler ^ $
You mod_gzip_item_include text mime ^ /.*
You mod_gzip_item_include ^ mime application / x-javascript. *
You mod_gzip_item_exclude mime ^ image /.*
mod_gzip_item_exclude rspheader ^ Content-Encoding:. * * gzip.
</
If the version of your server is Apache 2.x, you can use the mod_deflate function as well:
<IfModule mod_deflate.c>
<FilesMatch " (css | js | x html |? Php). $">
SetOutputFilter DEFLATE
</ FilesMatch>
</ IfModule>

 

10. Add all your cache static content

Add Headers Expiration ( Expire Headers ) and cache control headers ( Cache-Control Headers ) will cause fewer HTTP requests which will decrease the load time of your website is performing. The Expiration Headers  are generally used with images, but can be used with style sheets, scripts, flash components, etc. This will help you to increase pagespeed.

Here I leave an example of what you should put in your file  .htaccess  to implement these headers:

# START Expiration Headers
<IfModule mod_expires.c>
On ExpiresActive
ExpiresDefault "access plus 1 seconds"
ExpiresByType image / x-icon "access plus seconds 2592000"
ExpiresByType image / jpeg "access plus seconds 2592000"
ExpiresByType image / png "access plus seconds 2592000"
ExpiresByType image / gif "access plus seconds 2592000"
ExpiresByType application / x-shockwave-flash "access plus seconds 2592000"
ExpiresByType text / css "access plus 604800 seconds"
ExpiresByType text / javascript "access plus 216000 seconds"
ExpiresByType application / javascript "access plus 216000 seconds"
ExpiresByType application / x-javascript "access plus 216000 seconds"
ExpiresByType text / html "access plus 600 seconds"
ExpiresByType application / xhtml + xml "access plus 600 seconds"
</ IfModule>
# END Expiration Headers
Cache-Control headers #EMPIEZA
<IfModule mod_headers.c>
Header unset ETag
None FileETag
<FilesMatch " (ico | jpe g |? Png | gif | swf). $">
Header September Cache-Control "max-age = 2592000, public"
</ FilesMatch>
<FilesMatch ". (Css) $">
Header September Cache-Control "max-age = 604800, public"
</ FilesMatch>
<FilesMatch ". (Js) $">
Header September Cache-Control "max-age = 216000, private"
</ FilesMatch>
<FilesMatch " (x html |? Php). $">
Header September Cache-Control "max-age = 600, private, must-revalidate"
</ FilesMatch>
</ IfModule>
# END Cache-Control Headers

11. Optimize your CSS and JavaScript files

The CSS and JavaScript files can be optimized to reduce the size of these. For example, blank lines and unused CSS classes should be eliminated. By optimizing these files, you can effectively reduce server bandwidth and save space on your hard disk. This will help you to increase pagespeed. To compress the CSS there are several tools:

To help you optimize your JavaScript files are the following tools:

12. Move calls to JavaScript files in the background

A server can only load a certain limit of items at once. If you are using many JavaScript in your WordPress site, then you have to compress them. After compressing the scripts, you must move to the bottom of your blog template, usually before the tag  </ body> , so that the content (images, css, etc.) is loaded first. This will help you to increase pagespeed.

Something like that:

<Script type = "text / javascript"  src = "algunScript.js" > </ script>
<Script type = "text / javascript"  src = "otroScript.js" > </ script>
</ Body>

13. Use the AJAX Libraries API Google

The  AJAX Libraries API  is an attempt to make Web applications faster for developers simply, becoming a content distribution network architecture in a burden on popular JavaScript libraries, including:

To implement it on your site you can use the Google API:

<Script type = "text / javascript" src = "http://www.google.com/jsapi" > </script>
<Script type = "text / javascript" > google.load ( "jquery" , "1.3.2" ); </script>

Or link the source code directly into the template of your blog:

<Script type= "text/javascript" src= " http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js " ></script>

14. Reduce the use of external scripts

When your blog loads slowly, you should seriously consider removing widgets like  Facebook Fans or  latest updates on Twitter  or buttons such as  tweetmeme , for you are making your site load dependent on other sites. For example, if you’re using the button  retweet  and  tweetmeme  is down, your blog will not load properly. Try to avoid these plugins or widgets as you can. This will help you to increase pagespeed.

15. Use CSS Sprites

CSS Sprites are combined multiple images into one big image. Then using CSS you can ‘ cut ‘or select the piece of image you want to use in a given class, instead of having multiple images used multiple times.This is good because it requires fewer requests to the server. And help to Increase PageSpeed.

Here I leave some items for you to learn more about CSS Sprites:

Consider all above mentioned tips to get Increase PageSpeed of your WordPress Site exponentially.

Abhijit is a Certified Digital Marketer and passion-driven creative individual based in Maharashtra (Karad). He is also Freelance Blogger, Enterprenuer and Webmaster.