Knowledge Base
MilesWeb / WordPress FAQ

Discover Where to Find Important WordPress Files

Approx. read time : 3 min

Places to Change WordPress Files

Some of them directly go to Appearance > Editor and start modifying the .php files within their theme. This leads to ending up with a broken site.

Therefore, the theme editor is turned off by default by the web hosts. In case you don’t understand the layout and syntax of PHP, you can easily break your site.

At some times, you will need to tweak certain files in your theme.

Check the overview of WordPress’ file structure so you can get familiar with what is where, including the files that commonly modified with complete care.

WordPress File Locations

In case you are using cPanel web hosting, you can use the File Manager interface in your cPanel to view files.

Optionally, you can also use the FTP client such as FileZilla for connecting to your hosting server and viewing files in that way.

To find your website files navigate to the root of your hosting account. This generally labeled as “public_html”.

You will find the WordPress core files in the root folder in which WordPress is installed. The files that you might you need to modify in the root are as below:

  • robots.txt – The robots.txt file instructs to bots that crawl websites, e.g. Googlebot.
  • htaccess – The .htaccess file is a configuration file that is used by Apache, the most common web server software.
  • wp-config.php – It is one of the most important WordPress files. It is located in the root and comprises of your website’s base configuration details, such as database connection information.

The /wp-admin/ directory

The /wp-admin/ directory comprises of all the backend WordPress dashboard files. You don’t need to change any files there.

The /wp-content/ directory

In the /wp-content/ directory, you’ll find your plugin, theme files, and uploads. Though there are other directories too, you most likely will never have dive into those.

The /wp-content/themes/ directory

In the themes directory, you will find your theme files as well as your style.css file. The style.css file is the file that most website owners need to modify. It contains the global font sizes, layouts, colors and spacing for your theme.

The /wp-content/plugins/ directory

The plugins directory comprises of plugin files.

The /wp-content/uploads/ directory

This directory comprises of files and graphics that you have uploaded for your pages and posts. The site’s media is arranged by year/month.

The /wp-includes/ directory

You won’t always have a reason to change any files in the wp-includes directory. In this directory you will find the packages that are included by the WordPress core and maintained by the WordPress core team. Those packages need to be available with you as your themes and plugins depend on them.

You can check the entire list of the WordPress directory structure and the files in the WordPress codex.

Important:

Prior to modifying any WordPress files, ensure that you always make a copy of the original and save it to your hard drive. This will help you to easily restore the entire original code and go back to the drawing board, if you don’t like the results.

Pallavi is a Digital Marketing Executive at MilesWeb and has an experience of over 4 years in content development. She is interested in writing engaging content on business, technology, web hosting and other topics related to information technology.
Need help? We’re always here for you.