Your internet web page’s .htaccess document is a tiny on the other hand essential document that runs at the back of the scenes and acts like a number of instructions to your server.
The document tells recommendations on the best way to care for things like permalinks and security features. Unfortunately, this document can get corrupted for somewhat numerous reasons, leading to issues like broken links or a white computer screen of loss of life.
Our revel in throughout the WordPress industry has taught us that improving the document may also be difficult, specifically for novices. On the other hand don’t worry, we’ll teach you recommendations on the best way to get right of entry to the document merely and make changes to get to the bottom of any issue.
In this article, we’ll walk you via recommendations on the best way to restore the WordPress .htaccess document.
Right here’s a quick overview of the whole thing we will cover in this data. You’ll click on at the links underneath to jump to any section:
- What Is the .htaccess Document?
- Tips on how to Inform If Your .htaccess Document Is Corrupted
- Tips on how to Get admission to and Repair .htaccess Document in WordPress
- Not unusual Problems to Repair in WordPress .htaccess Document
- Bonus: Rent a WordPress Improve Company
- Further Assets for the WordPress .htaccess Document
What Is the .htaccess Record?
The .htaccess record is a hidden configuration document that plays a vital serve as in how your WordPress website online operates. It’s essentially a number of instructions for the Apache web server, the tool that is generally run by the use of your WordPress website online internet hosting.
One in every of its core functions is creating user-friendly URLs to your blog posts and pages. The ones are the clean and descriptive addresses you see to your browser bar instead of long, cryptic strings.
You’ll moreover use a .htaccess document to organize security features like password-protecting certain directories or blocking off get right of entry to makes an strive from suspicious IP addresses.
Besides that, some plugins use .htaccess to implement caching, which is in a position to fortify your website’s loading velocity.
That discussed, let’s take a look at one of the most a very powerful signs that’d tell your .htaccess document needs fixing.
Tips about the best way to Tell If Your .htaccess Record Is Corrupted
The .htaccess document would possibly change into corrupted for a few reasons. It should neatly be on account of a plugin combat, unintended edits, or most likely a server glitch.
Listed here are some signs it’s imaginable you’ll understand for your WordPress website online that counsel the .htaccess document is broken:
- Broken links: A damaged hyperlink occurs when the individual isn’t taken anywhere, or they see unusual error messages.
- White computer screen of loss of life: This is when your internet web page displays no longer the rest on the other hand a blank white computer screen.
- Plugins not working appropriately: Some plugins rely on particular instructions throughout the .htaccess document to function accurately, on the other hand on account of an error, they don’t perform as they’re meant.
Now, let’s take a look at alternative ways you’ll get right of entry to and edit the .htaccess document in WordPress.
Tips about the best way to Get right of entry to and Restore .htaccess Record in WordPress
The .htaccess document is located throughout the root listing of your internet web page. There are alternative ways to get right of entry to and edit the document.
For instance, you’ll use the website online internet hosting provider’s cPanel and get right of entry to the document using the Record Manager. You’ll moreover connect to your website online using an FTP client and take a look at different data and folders. Otherwise is to use a plugin to view and edit the .htaccess document content material subject matter.
Skilled Tip: Previous to improving the .htaccess document, it’s very best to create a backup of your WordPress internet web page. This fashion, you’ll merely restore it if anything goes incorrect. For added details, please see our data on tips on how to again up a WordPress web site.
Let’s take a look at each and every of the ones methods in detail.
1. Restore .htaccess Record using Record Manager or FTP Shopper
If you’re no longer in a position to get right of entry to the WordPress dashboard, then you definitely’ll use a Record Manager or FTP service to search out the .htaccess document.
To start, you’ll open cPanel of your WordPress website online internet hosting service. As an example, in Bluehost, you’ll open the internet web page settings.
After that, you’ll need to switch to the ‘Difficult’ tab.
From correct right here, scroll correct all the way down to the ‘cPanel’ chance and click on at the ‘Organize’ button.
As quickly because the cPanel opens, you’ll navigate to the ‘Files’ section.
Move ahead and click on at the ‘Record Manager’ chance.
Next, you will see different data and folders for your internet web page.
The .htaccess document is located throughout the public_html folder. Simply open the folder from the menu on the left and scroll down to hunt out the .htaccess document.
You’ll then right-click the .htaccess document and choose the ‘Edit’ strategy to restore any issues.
Bear in mind: If you’ll be able to’t to search out your .htaccess document, then see our data on tips on how to to find the .htaccess record in WordPress.
Next, a popup will open, warning you to once more up the original document previous to improving. Move ahead and click on at the ‘Edit’ button.
On the next computer screen, you will see the .htaccess document editor.
Proper right here, you’ll make changes and fix the document. As an example, you’ll check out for any typos, improper syntax, or incompatible code that can reason why errors.
However, using an FTP (record switch protocol) consumer is another choice for getting access to the document.
You’ll to search out the document throughout the root checklist. Simply right-click the .htaccess document and click on at the ‘View/Edit’ chance.
If you haven’t used FTP previous to, then please see our data on tips on how to use FTP to add information to WordPress.
Next you’ll edit the document in notepad tool for your computer.
When you’ve fastened the .htaccess document, you’ll upload it once more to the root checklist using the FTP service.
2. Restore the .htaccess Record Using a Plugin
If you’re able to view the WordPress dashboard, then otherwise of getting access to and embellishing the .htaccess document is by the use of using a plugin like All in One search engine marketing (AIOSEO).
It’s the easiest search engine marketing plugin for WordPress. It’s serving to you optimize your website online for search engines like google and yahoo like google without any technical knowledge. The plugin supplies somewhat numerous tools, at the side of a robots.txt editor, a .htaccess editor, database tools, and additional.
To start, you’ll need to arrange and switch at the AIOSEO plugin. If you wish to have lend a hand, then please see our data on recommendations on the best way to arrange a WordPress plugin.
Upon activation, you will see the welcome computer screen and AIOSEO setup wizard. Simply click on at the ‘Let’s Get Started’ button and practice the onscreen instructions.
For added details, please see our data on tips on how to arrange All in One search engine marketing for WordPress as it should be.
Next, you’ll head to All in One SEO » Equipment from the WordPress admin panel and switch to the ‘.htaccess Editor’ tab to edit the document’s contents.
When you’ve made changes and glued the document, simply click on at the ‘Save Changes’ button on the most productive.
No longer strange Issues to Restore in WordPress .htaccess Record
Now that you already know where to hunt out the .htaccess document and recommendations on the best way to edit it, let’s take a look at different issues you’ll restore throughout the document.
1. Fixing 500 Internal Server Error
A 500 inside of server error in WordPress is a elementary error message that indicates the server encountered an unexpected drawback and couldn’t fulfill your request. It’s like a cryptic message from your internet web page saying something went incorrect, but it doesn’t give particular details about what.
The error message moreover seems different depending on the internet server tool (Nginx or Apache) your website online uses. As an example, correct right here’s the best way it seems that when using Ngnix and Google Chrome.
This error may also be resulted in by the use of a corrupted .htaccess document. You’ll restore the error by the use of converting the present document with a brand spanking new one.
Simply get right of entry to your internet web page’s root folder using an FTP client. Then, rename the existing .htaccess document so it’s available as a backup and WordPress cannot recognize it. After that, create a brand spanking new document throughout the checklist and name it a ‘.htaccess’ document.
Now, open the new document and edit it.
Move ahead and enter the following code throughout the document:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
For added details, please see our whole data on tips on how to repair the five hundred inside server error in WordPress.
2. Fixing Error Too Many Redirects Issue
The ‘Error too many redirects’ generally occurs on account of a misconfigured redirection think about WordPress. This results in a redirection loop, and in addition you’ll see this error throughout the web browser.
One of the most to fix this issue is by the use of resetting the .htaccess document throughout the root checklist.
First, you’ll need to discuss with the root checklist of your website online using an FTP client or Record Manager. Next, in finding the .htaccess document and delete it. Now, check out visiting your internet web page to look if the redirect error is fastened.
Since you merely removed the .htacess document, you’ll need to recreate it. WordPress mechanically creates one for you. To ensure it does, simply discuss with the Settings » Permalinks internet web page from the WordPress dashboard and click on at the ‘Save Changes’ button at the bottom.
To learn further ways to fix the issue, please see our data on tips on how to repair error too many redirects factor in WordPress.
3. Fixing Posts Returning 404 Error
Each different issue you’ll restore throughout the .htaccess document is the posts returning 404 errors. Generally, a corrupted or missing .htaccess document would possibly purpose this error.
To get to the bottom of this issue, you’ll need to change the document from the root checklist and change the document permissions. Simply in finding the document using an FTP client, right-click the document, and then choose the ‘Record permissions’ chance.
Next, you will see different settings to modify for the .htaccess document.
Move ahead and make the document writeable by the use of changing its permissions and entering ‘666’ into the ‘Numeric value’ box. Once that’s carried out, click on on on the ‘OK’ button.
For added ways to fix the issue and whole steps, chances are high that you’ll want to see our data on tips on how to repair WordPress posts returning 404 error.
There are many other errors that can occur for your website online, and it’s imaginable you’ll need to restore the .htaccess document. See our whole checklist of the maximum not unusual WordPress mistakes and tips on how to repair them.
Bonus: Hire a WordPress Strengthen Corporate
Running with a .htaccess document may also be difficult because it now and again involves improving code, and getting access to the document may also be frustrating for novices.
That’s the position a WordPress repairs and give a boost to company let you out. You’ll hire WordPress pros who can restore the .htaccess document and care for the whole thing for you.
As an example, we offer Top class WordPress Improve Services and products. For a one-time value, our pros can restore errors and other issues for your internet web page, at the side of problems with .htaccess.
However, in case you’re on the lookout for ongoing lend a hand, then our WPBeginner Professional Upkeep Services and products is generally the next are compatible.
We’ve over 16 years of revel in, having helped 100,000+ shoppers with WordPress and fixing their web sites.
Our workforce of pros is available 24/7 to ensure your website online functions appropriately. We will be able to check out whether or not or no longer the .htaccess document is accurately configured or what should be fastened so that your visitors have an excellent internet web page revel in.
You will moreover get get right of entry to to core upkeep tasks like backups, protection updates, plugin troubleshooting, theme customization, and on-demand fortify.
You’ll moreover get other services and products and merchandise to your WordPress internet web page. See our whole checklist of WPBeginner Professional Services and products.
Additional Belongings for the WordPress .htaccess Record
- Tips on how to Prevent WordPress From Overwriting .htaccess Document
- Tips on how to Restrict Get admission to by way of IP to Your wp-login.php record in WordPress
- Maximum Helpful .htaccess Methods for WordPress
- Tips on how to Redirect a Web page or URL in WordPress (2 Strategies)
- Tips on how to Repair Deadly Error: Most Execution Time Exceeded in WordPress
We hope this article helped you learn how to restore the WordPress .htaccess document. You may additionally want to see our data on eCommerce repairs guidelines and our a professional make a selection of the easiest WordPress give a boost to businesses.
If you preferred this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You’ll moreover to search out us on Twitter and Fb.
The publish Tips on how to Repair the WordPress .htaccess Document (Amateur’s Information) first seemed on WPBeginner.
Contents
- 0.0.1 What Is the .htaccess Record?
- 0.0.2 Tips about the best way to Tell If Your .htaccess Record Is Corrupted
- 0.0.3 Tips about the best way to Get right of entry to and Restore .htaccess Record in WordPress
- 0.0.4 No longer strange Issues to Restore in WordPress .htaccess Record
- 0.0.5 Bonus: Hire a WordPress Strengthen Corporate
- 0.0.6 Additional Belongings for the WordPress .htaccess Record
- 0.1 Related posts:
- 1 20 Best possible WordPress Task Board Topics and Plugins for 2023
- 2 What’s AI? What Entrepreneurs Wish to Know
- 3 How to Build a Hero Section with Divi’s Fullwidth Header Module
0 Comments