{"id":1008,"date":"2018-03-02T11:52:51","date_gmt":"2018-03-02T11:52:51","guid":{"rendered":"https:\/\/www.newdelhihosting.co.in\/blog\/?p=1008"},"modified":"2018-03-02T11:53:29","modified_gmt":"2018-03-02T11:53:29","slug":"steps-to-optimize-wordpress-for-better-performance","status":"publish","type":"post","link":"https:\/\/www.newdelhihosting.co.in\/blog\/steps-to-optimize-wordpress-for-better-performance\/","title":{"rendered":"7 Steps to Optimize WordPress for Better Performance"},"content":{"rendered":"<p>In this blog we are going to see some ideas on how to improve the speed of our WordPress website. Having a fast site is necessity to provide our visitors with great user experience and rank well in the search engines like Google which take the loading speed of our pages into consideration.<\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"text-decoration: underline;\">Step1:\u00a0<\/span><span id=\"Enable_Dynamic_Caching\" class=\"ez-toc-section\"><span style=\"text-decoration: underline;\">Enable Dynamic Caching :<\/span>&#8211;<\/span><\/strong><\/p>\n<p>&#8220;Adding Dynamic caching&#8221; to your WordPress site will have great effect on its speed. There are many services like Varnish and APC that can be used but all of them require a lot of server configuration and tweaking of your application to work correctly. For this\u00a0 we can install a simple wordpress plugin &#8220;<strong>WP Super Cache<\/strong>&#8220;.\u00a0This plugin generates static html files from your dynamic WordPress blog. After a html file is generated your webserver will serve that file instead of processing the comparatively heavier and more expensive WordPress PHP scripts.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Step2:\u00a0<\/strong><\/span><span id=\"Enable_gZIP_compression\" class=\"ez-toc-section\"><strong><span style=\"text-decoration: underline;\">Enable gZIP compression<\/span> :-<\/strong><br \/>\n<\/span><\/p>\n<p>To decrease the size of data that&#8217;s being transferred between your server and visitors, you can enable the gZIP compression for your images, CSS and JavaScript files at <a href=\"http:\/\/www.newdelhihosting.co.in\">New Delhi hosting<\/a> we provide gzip compression provisioned in cPanel ,By doing this, the web server will compress this content before it&#8217;s transferred over the Internet to your browser.<\/p>\n<p>The easiest way to enable the gZIP compression for your images, CSS and JS files is to add these lines to your .htaccess file in the root WordPress folder:<\/p>\n<pre>## Enable gZIP Compression ##\r\n<em>AddOutputFilterByType DEFLATE text\/plain\r\nAddOutputFilterByType DEFLATE text\/html\r\nAddOutputFilterByType DEFLATE text\/xml\r\nAddOutputFilterByType DEFLATE text\/css\r\nAddOutputFilterByType DEFLATE application\/xml\r\nAddOutputFilterByType DEFLATE application\/xhtml+xml\r\nAddOutputFilterByType DEFLATE application\/rss+xml\r\nAddOutputFilterByType DEFLATE application\/javascript\r\nAddOutputFilterByType DEFLATE application\/x-javascript<\/em>\r\n## Enable gZIP Compression ##<\/pre>\n<p><span style=\"text-decoration: underline;\"><strong>Step3: Use a CDN :-<\/strong><\/span><br \/>\nCDN -Content delivery networks are server networks that clone cached copies of your site on all of their location nodes. This means that when your visitors request your site, cache of it will be served by the closest server location, rather than the main datacenter of your hosting provider.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Step4:\u00a0<span id=\"Optimize_your_Images\" class=\"ez-toc-section\">Optimize your Images:-<\/span><\/strong><\/span><\/p>\n<p>Images are important to have them optimized,It is essential part of every website There are few things regarding your images that you should have in mind when developing your WordPress site:<\/p>\n<p>&nbsp;<\/p>\n<p>4a) Do not upload big images and then scale them with HTML.Use images with the proper size. Make sure that your images are not bigger than the size you&#8217;re actually displaying them in.<\/p>\n<p>4b) <strong>Smush<\/strong> your images. Smushing them will remove all the additional data from your photos &#8211; creation date, camera used for the photo, GPS coordinates, etc. There is a &#8220;plugin&#8221; that does that for you called WP <strong>Smush.it<\/strong>.<\/p>\n<p>4c) Use Sprites for your themes. Using sprites is a CSS technique that uses a single image to show multiple design elements on your pages. This way instead of loading dozens of small images,your site will open a single one.<\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"text-decoration: underline;\">Step5:\u00a0<\/span><span id=\"Minify_your_JavaScript_and_CSS_files\" class=\"ez-toc-section\"><span style=\"text-decoration: underline;\">Minify your JavaScript and CSS files :-<\/span><br \/>\n<\/span><\/strong><\/p>\n<p>Minifying your CSS and JavaScript files means that all the unnecessary data from them like double spaces, empty new lines, comments, etc. will be removed from the files lowering their size. There are many online tools that you can use for free to minify your files. In addition, if you&#8217;re using the W3 Total Cache plugin, it has an option to automatically minify your theme&#8217;s CSS and JS files.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Step6:\u00a0<\/strong><\/span><span id=\"Leverage_browser_caching\" class=\"ez-toc-section\"><span style=\"text-decoration: underline;\"><strong>Leverage browser caching :-<\/strong><\/span><br \/>\n<\/span><\/p>\n<p>It means that you can specify for how long your visitors&#8217; browsers should cache your images, CSS, JS and flash files.However, if any of those resources is cached, your server will notify the visitor&#8217;s browser and the cached content will be replaced with the new one.<\/p>\n<p>&nbsp;<\/p>\n<p>You can add the following line to &#8220;.htaccess&#8221; file of wordpress.<\/p>\n<pre><em>\r\nExpiresActive On\r\nExpiresByType image\/jpg \"access 1 year\"\r\nExpiresByType image\/jpeg \"access 1 year\"\r\nExpiresByType image\/gif \"access 1 year\"\r\nExpiresByType image\/png \"access 1 year\"\r\nExpiresByType text\/css \"access 1 month\"\r\nExpiresByType application\/pdf \"access 1 month\"\r\nExpiresByType application\/x-javascript \"access 1 month\"\r\nExpiresByType application\/javascript \"access 1 month\"\r\nExpiresByType application\/x-shockwave-flash \"access 1 month\"\r\nExpiresByType image\/x-icon \"access 1 year\"\r\nExpiresDefault \"access 2 days\"\r\n<\/em>\r\n<\/pre>\n<p><span style=\"text-decoration: underline;\"><strong>Step7: Optimize your WordPress Database:-<\/strong><\/span><\/p>\n<p>It is essential to optimize the wordpress database from time to time.Every time your web application runs a database query, the database will look through all the rows in your table to find those that match your request.A database index is a data structure that improves the speed of operations in a table<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog we are going to see some ideas on how to improve the speed of our WordPress website. Having a fast site is necessity to provide our visitors with great user experience and rank well in the search engines like Google which take the loading speed of our pages into consideration. &nbsp; Step1:\u00a0Enable&#8230;<\/p>\n","protected":false},"author":1,"featured_media":1009,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[25],"tags":[],"class_list":["post-1008","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress"],"jetpack_featured_media_url":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2018\/03\/optimize_wordpress.jpg","_links":{"self":[{"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/posts\/1008"}],"collection":[{"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/comments?post=1008"}],"version-history":[{"count":4,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/posts\/1008\/revisions"}],"predecessor-version":[{"id":1013,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/posts\/1008\/revisions\/1013"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/media\/1009"}],"wp:attachment":[{"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/media?parent=1008"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/categories?post=1008"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/tags?post=1008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}