Skokie SEO > Where Is wp-config.php and How to Access the File

Where Is wp-config.php and How to Access the File

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

Quick answer:

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.

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.

file manager in cpanel
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.

public_html in file manager

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.

where wp-config.php

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:

But the domain where you need to find wp-config.php is on, you would follow the same steps above. But in public_html, you’ll need to locate the folder of

Like this:

addon domain example in file manager

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.

siteground site tools

Then it’s basically the same process.

On the left side, click Site > File Manager.

Then open public_html.

siteground file manager
SiteGround File Manager

Then scroll down to find wp-config.php.

siteground file manager

That’s it!

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:

  • Hostname
  • Username
  • Password
  • Port number (if necessary)
FTP Login

Once you’re logged in, navigate to the public_html folder.

ftp public_html

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!

4 thoughts on “Where Is wp-config.php and How to Access the File”

  1. 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.

Leave a Comment

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