NR Hosting Ltd

How to speed up your WordPress site without plugin?

How to speed up your WordPress site without plugin?

Speed Up WordPress Site – We all want to speed up our wordpress site. Most of us do it using plugins which in return makes our site heavy.

Now, let’s speed up and optimize your WordPress website right now. This is more for advanced users who are comfortable with modifying the .htaccess file, php.ini file and wp-config. Remember; always back up your website before making any drastic changes like this.

Speed Up WordPress Site

Step 1

Test your site on Google PageSpeed Insights to view your current score.

Step 2

Open up your .htaccess file located in the root directory of your website. This can be found by accessing your files via FTP. What we want to do here is enable browser caching. Once you save the changes to your file, go back to your website and make sure it’s still functioning normally.


# BEGIN Expire headers

ExpiresActive On

ExpiresDefault “access plus 5 seconds”

ExpiresByType image/x-icon “access plus 2592000 seconds”

ExpiresByType image/jpeg “access plus 2592000 seconds”

ExpiresByType image/png “access plus 2592000 seconds”

ExpiresByType image/gif “access plus 2592000 seconds”

ExpiresByType application/x-shockwave-flash “access plus 2592000 seconds”

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”

# END Expire headers

# BEGIN Cache-Control Headers

<filesMatch “\.(ico|jpe?g|png|gif|swf)$”>

Header set Cache-Control “public”

<filesMatch “\.(css)$”>

Header set Cache-Control “public”

<filesMatch “\.(js)$”>

Header set Cache-Control “private”

<filesMatch “\.(x?html?|php)$”>

Header set Cache-Control “private, must-revalidate”

# END Cache-Control Headers


Step 3

Limit the number of post revisions. By default, WordPress stores every change you make in your pages and posts. Saving too many of these old files can weigh down your website causing it to be slow. Locate your wp-config.php file in the root directory of the WordPress installation. Add this line of code to your file.


/**Limit Post Revisions**/

define( ‘WP_POST_REVISIONS’, 3);


Alternativly, you can set wordpress to not store revisions at all. You would then call your code out like this:

define( ‘WP_POST_REVISIONS’, false);

Step 4

Locate your PHP.INI file. This will vary depending on your host. Check your hosting control panel for a section labeled something similar to “CGI PHP Scripts”. Or just check with your specific host. When you located your php.ini file, you want to enable Gzipping.

Search for this line


zlib.output_compression = Off


Change the word “Off” to “On”.

Now search for this line


zlib.output_compression_level = 6


The level “#” you currently have will more than likely be different. Set it to the number 6 as shown above. Save your file and make sure your website is still working correctly. You should be able to see an increase of speed of your website.

Step 5

Retest your site on Google PageSpeed Insights to view your new score. How do they compare?

You can spend hours trying to speed up your website doing all sorts of things like CDN and CSS Sprites. And when you have time to do all that, do it! But until you can find that time, just enabling the following features I just showed you will speed up your WordPress website incredibly in less than 10 minutes of work! With no plugins at all!

Leave a Reply

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