Skip to content

5000+ Great Articles

Best Articles & Essays: Interesting Articles to Read Online

  • Fix Resolution When Using Your HDTV as a Monitor How-To
  • Convert Between Many Different Files Types Online Cool Websites
  • how do i permanently delete my google history? How-To
  • 5 iOS Apps That Are Guaranteed To Improve Your Sleep iOS
  • How to Enable 2FA on Zoom Using Your Favorite 2FA App How-To
  • Hard Drive Not Showing On iOS 13? Here’s How To Fix It iOS
  • What Is a GoPro & How To Get Started Using One Gadgets
  • Facebook Tips: Automatically backup your FB images to dropbox How-To

How To Speed Up Any WordPress Site Using .HTACCESS

Posted on October 8, 2020 By blog_786 No Comments on How To Speed Up Any WordPress Site Using .HTACCESS

Is your WordPress site taking too long to load? Did you know that a slow website will affect your search engine optimization and user experience?

There are several different ways to speed up your site besides using plugins. One way is to use the browser cache and the other is to compress your files.

Both can be done by modifying and optimizing the .htaccess file.

How To Speed Up Any WordPress Site Using .HTACCESS

What is browser cache?

When someone visits your site, there are files that are downloaded and stored in a temporary location.

File types include all documents that make up your website, such as HTML files, images, JavaScript, and CSS. The browser cache is a temporary location for downloaded files.

When the cache is full, it takes up too much space on the visitor’s computer. As a result, the browser is slow and the website takes too long to load.

– /

Fortunately, there is a way to fix this by editing the .htaccess file.

What to do first

Before you start editing your .htaccess file, take the following precautions:

  • Always back up your WordPress .htaccess file before modifying it.
  • Disable any WordPress plugins you may be using.
  • Test your site’s speed before making any changes to your .htaccess file to get a baseline. You can use GTmatrix, Pingdom, or Google PageSpeed ??Insights.

You are now ready to use the code from the .htaccess file to tell your WordPress installation to cache static files longer for repeat visitors to your site. You can use cPanel or FTP. See instructions below for each.

Once you have access to the .htaccess file, use the additional instructions to make your changes.

Using cPanel

Log into the cPanel of your site. This can usually be done by typing yourdomain.com/cPanel in your web browser.

How To Speed Up Any WordPress Site Using .HTACCESS

Log in using the username and password you provided when installing WordPress on your domain. Once logged in, find and click File Manager.

How To Speed Up Any WordPress Site Using .HTACCESS

Your .htaccess file is located in the root folder. The period before the filename indicates that this is a hidden file in your WordPress installation. Be sure to check the box next to “Show hidden files”.

How To Speed Up Any WordPress Site Using .HTACCESS

You must make a copy of your file before editing it, because if you make a mistake, you could destroy your site. To make a copy, click on .htaccess and select it. To save a copy, click the download button located in the top menu.

Once you’ve made your copy, you are now ready to edit the file. In the cPanel file manager, right-click on the .htaccess file and select Edit.

How To Speed Up Any WordPress Site Using .HTACCESS

Using FTP

You can also edit the .htaccess file using your FTP client. One of the popular FTP clients is FileZilla, which is used in the example below.

Start by opening your FTP client and enter your host. This is usually your domain address, your username and password. If you don’t know what this is, check with your web host.

How To Speed Up Any WordPress Site Using .HTACCESS

Use the following steps to access, copy and edit the .htaccess file:

  • Go to the root directory.
  • Find the .htaccess file, make a copy and drag it to your desktop.
  • Keep a copy of the original and edit another copy in case you need to restore the original.
  • Use an editor such as Notepad to edit the file.
  • When you’re done editing, upload the file to your root directory.

How To Speed Up Any WordPress Site Using .HTACCESS

If you are wrong, your site will not work. To fix this, download the backup file.

You are now ready to make changes to your .htaccess file to speed up your WordPress site.

Zip your files with Gzip

Gzip compression makes your files smaller and helps them load faster. Adding the below code to your .htaccess file (under the current code) with gzip compresses your CSS, HTML and PHP files.

# Compresses HTML, CSS, JavaScript, text, XML and fonts AddOutputFilterByType DEFLATE app / JavaScript app AddOutputFilterByType DEFLATE / RSS + XML AddOutputFilterByType DEFLATE app / vFndbilterByType DEFLATE app / vFndbilter.ms-fonte font application AddOutputFilterByType DEFLATE / x-font OpenType AddOutputFilterByType DEFLATE application / x-font-OTF application AddOutputFilterByType DEFLATE / x-font TrueType AddOutputFilterByType DEFHutputTTEFLATE application AddOutputFilterByType DEFLATE application / XML AddOutputFilterByType DEFLATE text / OpenType AddOutputFilterByType DEFLATE text / OTF AddOutputFilterByType DEFLATE text / TTF AddOutputFilterByType DEFLATE image / svg + xml AddOutputFilterByType DEFLATE image / x-icon AddOutputFilterByType DEFLATE text / CSS AddOutputFilterByType DEFLATE text / html AddOutputFilterByType DEFLATE text / JavaScript AddOutputFilterByType DEFLATE text / regular AddOutputFilterByType DEFLATE text / XML # Remove browser errors (only required for very old browsers) BrowserMatch ^ Mozilla / 4 GZIP Browser -only-text / html. ^ Mozilla 678] no-gzip BrowserMatch bMSIE! no-gzip! gzip-only-text / html Add header Edit User Agent

Don’t forget to click “Save Changes”.

Browser caching

When someone visits your website, the browser they are using downloads all the files associated with the page they are accessing.

Using browser cache means you only want to download the files you need, not unnecessary resources. This is usually the design and style of your page, and sometimes includes JavaScript functionality as well.

When you use the browser cache, you tell the server to ignore the parts of your web page that were previously loaded for repeat visitors.

To edit the .htaccess file, find it and make two copies in the same way as you did when compressing files as described above using an FTP client or cPanel.

Keep a copy of your original .htaccess file in case you have problems with the changes. Edit another copy.

Add the following code below the current content of your .htaccess file:

ExpiresActive On ExpiresDefault A0 ExpiresDefault A691200 ExpiresDefault A691200 ExpiresDefault A691200 ExpiresDefault A691200 Cache-Control header set” max-age = 691200 “ Cache-Control header set” max-age = 691200 “< / FilesMatch> Cache-Control Header Set “max- age = 691200 “ Header Set C ache-Control “max-age = 691200”

Don’t forget to click “Save” to save the additions to your file.

Compressing files and using the browser cache will dramatically reduce your web page load times. This will help your site rank higher in search and improve user experience. Nobody wants to wait more than a few seconds for a page to load.

–

Share this:

  • Twitter
  • Facebook
How-To

Post navigation

Previous Post: How To Reinstall Linux Mint Without Losing Your Data & Settings
Next Post: Does Windows 10 Need Antivirus When You Have Windows Defender?

Related Posts

  • Block File Downloads in Internet Explorer How-To
  • Download High Resolution Book Cover Art How-To
  • Here Are Some Biggest Myth in Technology How-To
  • How to Change Your Mouse Cursor in Chromebook How-To
  • 5 Ways To Record Calls on iPhone or Android How-To
  • How to Use Internet Effectively to Consume Information How-To

Leave a Reply Cancel reply

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

Archives

  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • March 2021
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • December 2019
  • July 2019
  • May 2019
  • April 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018

Categories

  • AI Tools & Guides
  • Amazon Web Services
  • Apple Watch
  • Computer Tips
  • Cool Websites
  • Featured Posts
  • Free Software Downloads
  • Gadgets
  • Gaming
  • General Software
  • Google Software/Tips
  • Hardware
  • Help Desk
  • How-To
  • iOS
  • iPad
  • iPhone
  • islamic Books
  • Linux
  • Linux Tips
  • Mac OS X
  • macOS
  • MS Office Tips
  • Networking
  • Office Tips
  • OS X
  • Product Reviews
  • Reviews
  • Safari
  • Smart Home
  • Smartphones
  • Software Reviews
  • technology
  • text
  • Tools Review
  • Troubleshooting
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • Windows 7
  • Windows XP Tips
  • Wordpress
  • SmartDNS vs VPN – What’s the Difference?
  • How to go Back to the old YouTube Layout (2017)
  • A Simple Trick to Get 50% Discount on Audible for Three Months
  • What Is “Other” Storage on Android And How to Clean It Up ?
  • 7 Legal Websites to Get Free Music Downloads
DMCA.com Protection Status

Recent Posts

  • SmartDNS vs VPN – What’s the Difference?
  • How to go Back to the old YouTube Layout (2017)
  • A Simple Trick to Get 50% Discount on Audible for Three Months
  • 6 Best PayPal Alternatives (2017)
  • How to Fix the the “Invalid SIM Card” Error on Android

Recent Comments

  1. A Simple Trick to Get 50% Discount on Audible for Three Months on Private Browsing: What is it and What it is not
  2. 6 Best PayPal Alternatives (2017) on How to Save Money While Shopping Online in India
  3. Automatically Transcribe YouTube Video/Audio with Google Docs on 5 Best Team Management Apps (For Small and Large Teams)
  4. 6 Things You Need Know About Email Encryption on Delete All Emails from Gmail With Once Click
  5. Looking For YouTube Alternative? Try These 7 Video Sharing Sites on Ten Best YouTube Video Editing Software 2023
  • How To Control Your Windows 10 PC With Your Voice Windows 10
  • How To Add A Font To Photoshop How-To
  • how to do a mail merge in word for letters MS Office Tips
  • HDG Explains : What Is UNIX? Linux Tips
  • How to Use Precision Finding to Locate a Nearby AirTag Tutorials
  • How to update games from PS4 to PS5 How-To
  • How to Block Someone on Spotify Computer Tips
  • Build a Chatbot with IBM Watson Assistant Cool Websites

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Go to mobile version