How to Access WordPress Files (4 Best Ways in 2024)

Learn how to access the WordPress files on your site through WordPress Dashboard, cPanel, FTP/SFTP, and plugins.

WordPress is an amazing platform that lets us create and maintain websites without having to code. Managing a WordPress site is also hassle-free. You don’t need to master its underlying stuff. 

But there are some instances that might require you to access the internal files of your site. That is when you have to access the files of your WordPress website.

If you are a beginner, you might eventually face some issues. In order to fix these, you might have to inspect the internal files of WordPress. To do this, you need to first access those. In this article, we will discuss How to access WordPress files and also how to edit those.

Why do you need to access WordPress files?

As we’ve discussed earlier, while using WordPress you might encounter some unexplained errors. If you have no prior coding knowledge, it might seem very confusing. Most of these quick fixes might involve modifying a few simple things on your WordPress website files (the wp-config.php file for example). But in order to do so, you must first access and explore your WordPress site files.

Your site might get targeted by hackers and this could also put you in a situation where you need to inspect and replace your core files. If you suspect that your website is hacked, you can check out our post on what to do when your WordPress site is hacked.

Again, sometimes your site might get stuck in maintenance mode in the middle of an update. It goes straight offline! You can solve it by accessing the internal files.

Get Latest Post Notifications!

Subscribe to our newsletter

Ways to access the files of your WordPress site

There are various ways for accessing your WordPress files. In this article, we will be mainly discussing 4 methods. These are:

  • Accessing WordPress files through the admin dashboard
  • Accessing WordPress files through cPanel
  • Accessing WordPress files through an FTP/SFTP client
  • Accessing WordPress files using plugins

It’s fine to use any of the above-mentioned methods but we do recommend that you keep a backup of your website files and databases beforehand. If you didn’t do a backup, you should do it before making any sort of changes to your website files.

Accessing WordPress files through the admin dashboard

Before you proceed, please note that editing your website PHP files from the dashboard or admin interface is risky.

If you do something wrong, your website can go offline and you could not undo the change from the dashboard. Because the dashboard itself would also go offline. So we really don’t recommend this method. But if it’s just editing your theme’s style.css file, this can be done.

Accessing the theme files

By default, WordPress gives you the option to view and modify the files of your themes and plugins. To do this, log in to your WordPress dashboard. From here, if you wish to access the files of your Themes, go to Appearance > Theme Editor.

accessing theme files from wordpress dashboard

When you click this option for the first time, WordPress might warn you about making changes to the theme. Keep the warning in mind and proceed. 

On the top right section of your screen, you can find a dropdown to select the theme you want to edit. If you have only one theme installed, you don’t need to select any other themes from this section. Right below the dropdown, you can see all the files of your theme.

Accessing WordPress plugin files

Similar to the step shown above, you can also access and modify your plugin files. You have to navigate to wp-admin > Plugins > Editor.

accessing plugin files from wordpress dashboard

From the dropdown located at the top right corner, you can select what plugin files you want to access. Here you can access and edit the files of the plugins that are installed on your WordPress website. You can edit the codes of your plugins and click on ‘Update File’ to save your changes.

Before making any changes to your plugin files make sure it is safe for you to do so. If you are unsure, then it’s better to leave things as it is. Also, make sure that you have a recent backup of your WordPress files to be on the safe side.

Accessing WordPress files through cPanel

This is the most common method of accessing your website files. The cPanel is basically the control panel given to you by your hosting provider. Through the cPanel, you can maintain your website easily.

login in to cPanel

To access your website files via cPanel, first log into your cPanel account. If you are unsure of your credentials, check in with your host. After you have successfully logged into cPanel, locate the Files section. Under the Files section, you will find an option called File Manager, open it.

File manager in cPanel

Once you open the File Manager, you will be directed to the location where your files are kept. You will find many files and folders here, but we are looking for a folder that contains all your website files.

locating public_html in file manager

You will see a folder called public_html, typically this is where your files are stored. Open the folder and you will have access to all your WordPress files. You will find your wp-config.php file and other files, e.g. for your themes and plugins as well.

Accessing WordPress files through an FTP/SFTP client

Another way of accessing your website files is through the File Transfer Protocol or FTP. This is a service generally provided by the hosting company of your WordPress website that lets you access the files of the website directly.

Using the FTP service you can accomplish a lot of tasks such as:

  • Transfer file – Upload or download files to and from your WordPress directory
  • Edit files – Delete, rename, copy, etc.
  • Create or rename directories

There are several FTP/SFTP software such as FileZilla, SmartFTP, NcFTP, WinSCP, etc. FileZilla is the most popular FTP/SFTP client. For this reason, we will be using FileZilla in this tutorial. 

But in order to do that, make sure that you have an FTP account already set up. If not, you can do it from your cPanel. Simply log into your cPanel and locate the Files section and go to FTP Accounts

FTP Accounts in cPanel

Next, you will be directed to the screen where you can create your FTP Account. Fill out the fields and create your account. Keep in mind, these are the credentials that you will need in order to connect FileZilla to your website files.

If you use a VPS (from Vultr, DigitalOcean, etc.), then you can use your SSH credentials to login with FileZilla.

Step 1: Install FTP client software

First, you have to install an FTP client software. Download and install FileZilla or any other FTP client you prefer. We are using FileZilla here.

FileZilla interface

We have mentioned it before but a quick reminder, ensure that you have an FTP account already set up. You will need that in the next step.

Step 2: Put in your credentials

After installation, open FileZilla and put in your credentials in the domain, username, and password field. By default, the port number will be 21. If your port number is different, make sure to change it. After that click on Quickconnect. If you are not sure about these details, you can check out this post on domain.com, FTP: How to Connect to your website.

Different FTP clients will have different interfaces, but these fields are common on each of them. If your credentials are ok, then your FTP should connect with your website.

Step 3: Locate public_html

When FileZilla successfully establishes a connection, you can explore your files on your server. Now just like before, find the public_html folder and open it. This is where all your WordPress files are stored. Now you can download the files, edit those and then upload those to your server quickly and easily.

finding public_html in filezilla

And that is how you can access your WordPress files using FileZilla. There you can simply drag and drop files and folders from your computer to your server and vice versa. The FTP allows you to quickly connect to the internet.

We recommend using SFTP instead of FTP as it encrypts your data keeping all of your documents safe. It also password protects your files. FileZilla provides both FTP and SFTP in the free version. The port number for SFTP is 22.

📌 Video: How To Access WordPress Files

Accessing WordPress files using plugins

Another easy way of accessing your WordPress files is using a plugin called WordPress File Manager. This plugin provides you with all the editing features like deleting, uploading, downloading, copying, pasting, renaming, etc.

Step 1: Install and activate File Manager

There are other plugins too that you can use to access your files but we are using File Manager here. From your WordPress Dashboard go to Plugins > Add New > Search for File Manager.

adding File Manager plugin from within wordpress dashboard

After the plugin has been installed and activated, it will appear on your dashboard.

Step 2: Open File Manager

The next step is to open the file manager plugin and get access to your WordPress files and folders.

accessing files with file manager plugin

And that is all you have to do to access your WordPress files and folders. You can open or download any files or folders here and also make changes to them.

Conclusion

WordPress might seem really simple when you are working on the front-end, but it can be complex under the hood. There are a lot of tools and programs that power up this popular CMS. It takes a lot of time and patience to analyze and work with the files of WordPress. But it is a rewarding process as well. While doing this, you gain more ideas on the environment of WordPress. You will have more confidence as you start to learn the general architecture of WordPress.

As we have mentioned in this article, usually making any changes to any of the core files of WordPress is a bad idea. However, if a file is compromised or inaccessible, then replacing the file with a good file from your backup might fix the issue. This of course requires you to have a prior backup of your website files.

We hope that you found this post helpful. We would love to know if this solved your problem. Let us know your thoughts in the comment section below.


Disclaimer: This post may contain affiliate links and we may receive a small commission if you purchase something by following them. However, we recommend services/products that we believe good to serve your purpose.

Leave a Reply

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