Has something gone wrong with your WordPress website and you are searching for answers that tell you that you need to edit your wp-config.php file?
Here is how to find it, both with or without FTP access.
Without FTP Access
Log in to your hosting account > cPanel > File Manager > public_html > wp-config.php
Where to Find wp-config.php [Screenshots]
Log in to your hosting account and find cPanel.
Your hosting account could most likely look a little different than this example (example here is GreenGeeks hosting).
But you should be able to click around in your hosting account until you find a cPanel link to click.
After you get into your cPanel, look for and click File Manager.
Usually the FILES section with File Manager is at the top of cPanel, but if your order is arranged a little different, scroll down to find it.
If you’re having trouble finding File Manager, use the search bar at the top of the page and start typing: file manager
And it will pop up for you to click.
In File Manager, look for public_html.
It should be in the left and right columns. Click public_html once in the left side column, or double click it in the right side column.
That will display your WordPress files where you can scroll and look for your wp-config.php file.
Warning: If you are going to edit the wp-config.php, be very, very careful. It is a core WordPress file, which means editing and saving it incorrectly or making a mistake can completely break your website.
It is highly recommended to make a backup of your site before making edits to the file just in case something goes wrong.
Be sure that you trust yourself or the tutorial you are following enough to make the edits yourself. If not, contact your webmaster or developer or your hosting company to help.
Other Ways to Find wp-config.php
If you have multiple WordPress websites in your hosting account, you will have addon domains. The steps above show how to find wp-config.php for your primary domain in your account through cPanel.
If you want to access wp-config.php in an addon domain, follow the same steps, but then you will need to find the folder of the site with the WordPress files.
For example, if your primary domain in your hosting account is: abcdef.com
But the domain where you need to find wp-config.php is on example.com, you would follow the same steps above. But in public_html, you’ll need to locate the folder of example.com.
You would just double click the folder of the domain and your WordPress files will be in there.
What If You Don’t Have the Traditional cPanel?
You may have a hosting company that doesn’t have the regular cPanel shown above. You should still be able to get to File Manager, it just may look a little different.
For example, SiteGround updated their hosting back-end and no longer offer the regular cPanel.
So in cases like that, find Site Tools for the WordPress site you want to edit or something similar, depending what your host offers or calls it.
Then it’s basically the same process.
On the left side, click Site > File Manager.
Then open public_html.
Then scroll down to find wp-config.php.
Those are a few different way you can navigate to find your wp-config.php file without using FTP.
What if you want to use an FTP client like FileZilla?
With FTP Access
You’ll need your basic FTP login info:
- Port number (if necessary)
Once you’re logged in, navigate to the public_html folder.
Double click the folder and scroll to find your wp-config.php file.
Backup Your Website Before Making Edits to wp-config.php
Again, it is very important to make a backup of your site before editing the file.
A small mistake like accidentally removing a line of code could take down your website.
Be careful and hopefully this article helped you to find where your wp-config.php file is!
3 thoughts on “Where Is wp-config.php and How to Access the File”
Thanks for the easy directions to find the wp-config.php file. but I agree, it’s a very important WP WordPress file so BE CAREFUL for anyone here that is gonna edit it.
wp-config and wp-content are important areas of a WordPress installation.
Make sure you don’t accidentally delete the wp config file like I did on my website!!