How to Edit WordPress htaccess File?

Affiliate disclosure: In full transparency – some of the links on our website are affiliate links, if you use them to make a purchase we will earn a commission at no additional cost for you (none whatsoever!).

WordPress, is the most popular Blogging CMS in the world as of now. It powers more then 25% of the total world websites! Now that, is a huge, huge number. And that also is the reason why I’m writing this piece on How to edit WordPress htaccess file.

Well, before you actually jump in and start pondering over How to Create and Edit WordPress .htaccess file or where is .htaccess file, let me make couple things clear.

See Also: How to customize WordPress themes?

I don’t want you messing with something you’re not sure about, so let’s get sure about what exactly is the .htaccess WordPress file, right?

What is WordPress .htaccess File:-

.htaccess is the file responsible for manipulating how the Apache server handles any changes in configuration of your WordPress CMS. So now you’d be asking, What do “changes” and “configuration” exactly mean, right?

So well, your WordPress is based out of a Permalink structure, isn’t it? And someone needs to handle how those permalinks would come into being, right? That’s what .htaccess does, it manipulates and changes and does whatever is needed to keep the pretty permalink structure of your WordPress stable and running.

That, sounded a bit complicated, huh? Well let me give you an “English version” of what .htaccess file can do for you:-

  • It can Protect your Admin Area!
  • It can even put in a Password Protection for your WordPress Folders!
  • Lets you hide backlinks and do some other magical tricks that might not be possible, or at least seem possible without it.
  • It has the power to hide / disable your directory from being browsed. Meaning your inner system files and stuff.
  • Wpconfig.php is one of the most important files to your WordPress blog, and well it can protect it!
  • Oh, and you can’t forget that it allows you 301 redirecting your blog in case you ever need it.
  • It can even help you banning someone from checking your blog out.

htaccess file for WordPress is often ignored, most webmasters don’t even use it to it’s full potential and instead waste thousands of dollars on third-party tools and plugins.

While all of those tweaks and tricks and little magical stuff performed by those tools could have been achieved simply by adding one extra line of code to our .htaccess file! So yeah the potential? It’s unlimited!

And some other stuff similar to that. So no doubt you’re curious about how to change .htaccess file WordPress, right? Yeah, that’s what I’m solving right here. Just keep reading.

See Also: How to Choose the Best WordPress Theme?

Where is .htaccess File:-

So once you know what exactly the .htacces file does, now you might proceed to something more practical like How to edit WordPress htaccess file right? But before that, you need to know where is .htaccess file don’t you?

The WordPress default htaccess file is located in your Cpanel, under your WordPress Installation. (Don’t worry, in the later sections I’m covering How to edit WordPress htaccess file, and there you can checkout the step by step procedure, and it’s location! )

How to Edit WordPress htaccess File:-

So yeah if you wondered How to Create and Edit WordPress .htaccess file then this section covers that for you. Not just that, this section will also show you where is .htaccess file located on your server.

So, before you can actually venture into how to change .htaccess file in WordPress, let’s first checkout where is .htaccess file located and then we can edit it.

Login to your Cpanel.

How-to-edit-wordpress-htaccess-file

Once you do, click on the File Manager option, and on the next popup, select Public_Html directory.

How-to-edit-wordpress-htaccess-file

Then, on the next page, click on the blog for which you are trying to edit the WordPress default htaccess file.

Well, you’re almost there. Put a bit of pressure on your eyes and you should be able to easily spot out the .htaccess file! (See? I told you I’d answer where is .htaccess file located on WordPress, right?)

How-to-edit-wordpress-htaccess-file

Now this is the part you’ve been waiting for, if you were wondering How to Edit WordPress htaccess File just right click on the file, and select edit.

How-to-edit-wordpress-htaccess-file

A new tab will open up with a text like an editor, that is where you can edit your .htaccess file without any fuss!

How-to-edit-wordpress-htaccess-file

So yeah that was about it ! Nothing like rocket science there right? But hey wait, you might not always find your .htaccess file in some cases, because they might be hidden! 

Well, so I thought why not add a section to explain it out how to show hidden htaccess files, right?

Well in order to do that, just make sure the checkbox that says “show hidden files” when you click on the File Manager is ticked!

How-to-edit-wordpress-htaccess-file

Just get it ticked, and you’re going to have a smooth sailing!

See Also: How to Install WordPress with cPanel?

Over to You:-

The .htaccess file is of utmost importance to your blog. It might seem like a tiny bit of code but it does miracles and magic when it comes to tweaking your blog for better performance or especially protecting it.

So I’m guessing this piece solved your issues over How to edit WordPress htaccess file right? Oh, I even tried my best to explain to you where is .htaccess file and how to show hidden htaccess files.

But I get it, there still might be couple doubts arising in that curious little mind of yours, guess what I love questions. Make use of the comment box; I’m here for each and every one of them.

evanderek

Leave a Comment