How To Speed Up WordPress Performance Without Plugin

Looking for the best ways to speed up WordPress performance without plugin?

There are various free and premium WordPress speed optimization plugins. Premium plugins like WPRocket help to SPEED UP WordPress easily but everyone can’t afford it. Some free plugins may slow down your website with unnecessary CSS & JS files instead of improving the speed. 

A single free plugin doesn’t offer all speed optimization features so you may need to install many plugins. But installing many plugins is not good for your site health. 

Do you know you can also fix a slow loading site without installing any plugin? However manual speed optimization is done by advanced users & developers, if you don’t belong to such users but want to improve speed without installing a plugin then this is the best guide for you.

In this article, I will elaborate different speed optimization settings that you need to configure on your website.

So Let’s dive right in.

Wait Wait !!

First test the speed of your website either on Google Page Speed Insights or GTMetrix.

test speed of website

How to Reduce WordPress Page Load Time without Plugin?

1. Break Comments into Pages

Comments enable interaction between author and readers where the reader can ask questions relevant to the topic and author reply to the comment. But the huge number of comments can hurt site speed.

WordPress takes time to load all comments including name, avatar and comment date. 

So, it is necessary to break comments into pages. It will load only a few latest comments and provide a link to load older comments.

Follow the steps mentioned below to break comments into pages:


  • Login to the admin dashboard of your site.
  • Inside the Settings tab, click on Discussion.
  • Find an option for Other Comment Settings.

Step2: There you will see break comments into pages option is unchecked i.e., disabled. So first enable this option.

It is recommended to load 5 to 10 comments per page for better page speed. Display the first page by default with newer comments at each page as shown in the screenshot below.

break comments into pages

2. Update WordPress to Latest Version

WordPress developers release a version not only to fix bugs but also implement speed optimization features. WordPress also forces third-party developers to release a new version by optimizing their themes & plugins.

It is recommended to run your site on the latest WordPress version. Here is the guide on how to safely update WordPress without losing content.

3. Update PHP version

WordPress is developed based on the PHP programming language. It is a server side language that is installed and runs on your web hosting server.

It is recommended to run WordPress on the latest PHP version. WordPress is two times faster with PHP 7 than its previous version. 

According to Kinsta, WordPress 5.0 PHP 7+ executes 253.20 requests per second

You can upgrade PHP to the latest version from the cPanel of your website. 
To do this first navigate to the Software section and open Select PHP Version. If the PHP version is set to older then choose the latest version from the dropdown as shown in the screenshot below.

update PHP version

4. Enable Content Compression

Content compression is offered by most of the web hosting providers in cPanel. But most of the people ignore this setting.

After enabling content compression, the speed of my site has drastically improved.  Content compression feature compress all types of content such as text, html, and images before sending it to the visitor’s browser. 

You can enable the content compression using website optimization tool and editing the .htaccess file. 

Using website optimization is the best method. So we will skip the second method.

Follow the every step mentioned right below to enable this feature using the website optimization tool. 


  • Login to the cPanel of your website using the format
  • Navigate to the Software section and open the Optimize Website option.


In the compress content window, you’ll see 3 options: Disabled, Compress All Content, and Compress the specified MIME types.

By default content compression feature is disabled. 

Compress All Content option will compress the entire content on your website.

Compress the specified MIME types option allows you to choose what type of files you want to compress.

But it is best to choose the second option i.e., Compress All Content. After you enable this option, click on the update settings button to save changes. 

content compression

5. Leverage Browser Caching

Caching improves the page speed by downloading the static data from the server and storing it in local storage. When users revisit the same web page then static data will be directly downloaded from the local cache not server.

Here static data are images, HTML, CSS and JavaScript. Normally such files are less modified. You can set how long the static files will be cached in the user’s browser. Cache will be cleared after the time expires. 

There are two ways you can leverage browser caching, first one is editing the .htaccess file and second by installing a caching plugin. But in this article we are going to improve page speed without installing a cache plugin.

Follow the steps mentioned below to leverage browser caching by modifying the .htaccess file. Here we are going to add Expires headers in Apache.

Step1: Login to the cPanel of your website using the format

Step2: Navigate to the File Manager under the Files section and access the public_html directory.

Step3: Edit the .htaccess file and insert the following code before “#BEGIN WordPress” or after “#END WordPress”.

ExpiresActive On
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/svg "access 1 year"
ExpiresByType image/x-icon "access 1 year"
ExpiresByType application/pdf "access 1 month"
ExpiresByType application/xhtml-xml "access 1 month"
ExpiresByType application/javascript "access 1 month" 
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresDefault "access 1 month"

In the code above, each static file has its own expiry time. You can adjust the expiry time based on how often you make changes on static files.

Don’t set expiry time too long because your visitor might not see the updated version of your website.

6. Defer Parsing of JavaScript 

If you’ve tested the speed of your site through GTMetrix or Google Page Speed Insight then there you might have seen a suggestion to defer parsing of JavaScript. 

When someone visits your website, the visitor’s browser starts from top to end of code to render your site. If a browser finds JavaScript, it will stop rendering of HTML and start parsing JS. Thus visitors need to wait for a longer time.

Defer parsing of JavaScript will tell browsers to parse JS only after the site’s main content is loaded.

There are different methods to defer parsing of JavaScript but in this article I will show you how to defer JavaScript via functions.php file.

First, open functions.php file either from cPanel or directly from WordPress theme editor. Insert the following code snippet to functions.php file of your theme.  

<?php //defer JS
function defer_parsing_of_js($url)
  if (is_admin()) return $url; //don't break WP Admin
  if (false === strpos($url, '.js')) return $url;
  if (strpos($url, 'jquery.js')) return $url;
  return str_replace(' src', ' defer src', $url);
add_filter('script_loader_tag', 'defer_parsing_of_js', 10);

The code above tells browsers to add a defer attribute to all JavaScript files except jQuery.

7. Use CDN for Speed Optimization

CDN (Content Delivery Network) is a collection of web hosting servers specially designed to host and distribute the static data of your website.  CDN is spreaded across the globe so when a user visits your website, static files are delivered to the user from the closest web server.

CDN is the significant method to make your website faster since it provides a powerful file caching mechanism. The Visitor’s browser will download HTML code from your origin server and the rest of the static content will be downloaded from a closest CDN server. 

There are many free and paid CDN service providers that you can choose to deliver website content faster. 

I am using Cloudflare to integrate CDN features on my website. 

After you configured your website on Cloudflare, here are the few things you should do for WordPress speed optimization

Minify CSS, JS & HTML Files:

Minifying or compressing the CSS & JS files will remove unnecessary or redundant data including spaces, indentation, and  newlines from the code. This will reduce the page load time and also saves bandwidth. 

Navigate to Speed tab and open the optimization setting. There you will find a setting called Auto Minify. Auto minify reduces the file size of source code on your website. 

Check the 3 options to enable auto minify feature for HTML, CSS & JS code as shown in the screenshot below.

enable auto minify in Cloudflare

Enable Brotli Compression:

Brotli is a compression algorithm developed by Google. JavaScript files compressed with Brotli are 14% smaller than gZip. CSS files are 17% smaller than gZip. Similarly HTML files are 21% smaller than gZip. 

Cloudflare offers Brotli compression feature for free. Navigate to Speed >> Optimization tab and enable the Brotli compression as shown in screenshot below.

enable Brotli compression in Cloudflare

Caching Level:

You can allow Cloudflare to cache how much of your website’s static content. There are 3 levels of caching static content:

*No query string: Delivers requested data from cache when there is no query string. Example:

*Ignore query string: Delivers same resources from cache to everyone ignoring query string. Example:

*Standard: Delivers a different resource each time query string change. Example:

I have chosen the Standard level for my website. You can choose a caching level according to your need under the Caching >> Configuration tab as shown in screenshot below.

caching level

Set Browser Cache TTL:

You can set the length of time Cloudflare instructs a visitor’s browser to cache static files. During this time, browsers will load static content directly from the local cache which improves the page load time of your website. 

As we have already added expiry headers in .htaccess file for leverage browser caching. So we will instruct Cloudflare to Respect Existing Headers.

set browse cache TTL in Cloudflare

8. Reduce HTTP Requests

When a visitor sends a request to the server, the browser starts downloading all the requested files from your origin server. Speed of the website depends on the number of HTTP requests.

Using a CDN & file caching service can help you to reduce HTTP requests but it is not enough. Here are the different ways to minimize HTTP requests on your WordPress website.

Reduce the Number of Plugins:

HTTP requests on WordPress increases if you have so many plugins installed on your website. 

Installing plugins can make your task easier but their CSS & JS files are also enqueued to the loading queue of your website. This will cause excessive HTTP requests and slows down your website.

So, uninstall and delete the plugins that are less necessary for your website. Always consider an all-in-one plugin like JetPack which provides different features such as security, traffic status, lazy loading for images, minify CSS & JS files. 

While choosing a theme, always consider a theme that offers different features such as social media icons, social sharing buttons, author bio box, related posts within the theme so you don’t need to install plugins. 

Delete Unused Media Files:

Get rid of media files such as images and videos because they not only generate HTTP requests but also make your website heavy. 

Simply open the WordPress Media library and start deleting images that you don’t use. 

Never Upload Files Directly:

WordPress allows you to upload files directly from the website dashboard. If you upload a video then WordPress will display it inside the HTML5 player. This means the browser will take longer time to download and load the video. 

A better solution is to upload videos on Youtube channel and embed the URL in your WordPress post. For PDF files, consider using GoogleDrive. 

Limit External Images:

External images appear in the comment section of your website. WordPress displays avatar or profile photo if the email address is connected to a Gravatar account. 

You can stop showing avatars from WordPress Settings tab >> Discussion >> Avatars as shown in the screenshot below.

stop showing avatar in WordPress comments

9. Load jQuery from CDN

WordPress websites including different plugins and themes depend on jQuery. In WordPress, jQuery is downloaded from our own website and loaded before the content. Downloading jQuery from the server takes longer than CDN. 

To load jQuery from CDN, first, you need to deregister default jQuery and register the new jQuery CDN link. To do this, insert the following code in the functions.php file of your theme. 

wp_enqueue_script('jquery', '', array(), true); ?>

10. Reduce Image Size to Speed Up WordPress Performance

I use Canva to create featured images and other pictures for my website but the size of the image becomes so large. When I upload such large images in WordPress, it degrades the speed at which content is delivered.  In this case, I use a free online tool to compress image size. 

There are many free online tools but compresspng is my favourite. 

If you don’t want to install plugins for image optimization then it is best to go with a manual process.

11. Disable / Limit Post Revisions

You can edit and make changes in posts and pages as you wish but WordPress also stores every change. Storing unnecessary files in the database not only  takes up more space but also slows down your website.

Inserting the following code in wp-config.php file can disable revisions. You can locate wp-config.php under the root directory of WordPress installation.

define( 'WP_POST_REVISIONS', false);

Alternatively, you can insert the following code in wp-config.php file to limit the post revisions.

/**Limit Post Revisions**/
define( 'WP_POST_REVISIONS', 3);

Conclusion: Small changes can make a huge performance boost

Thanks for reading the article. I hope the advice mentioned here has helped you to speed up WordPress and improve performance of your website.  

If you find the speed optimization guide helpful, then check out my article on the best WordPress security plugins.

FAQ: Speed Up WordPress Performance

  1. What slows down a WordPress site?

    Poorly coded themes & plugins, excessive HTTP requests, and JavaScript issues mainly slows down a WordPress site.

  2. Do Plugins slow down WordPress?

    If the plugin you install asset unnecessary or complex CSS & JS then you can lose 1 or 2 seconds of loading time.

  3. How do I fix a slow loading website?

    Enabling content compression, updating WordPress & PHP, using CDN, defer parsing of JS, and browser caching.

  4. How to reduce HTTP Requests in WordPress?

    Reduce the number of plugins, delete unused images, never upload files directly to WordPress, and limit external images like avatars in comments.

Leave a Reply