Where to find important WordPress files

Diving into WordPress directories

Editor’s note: The following article is curated from the GoDaddy community. We’ve made some light edits for formatting and clarity. 

Where do you change WordPress files?

Some folks jump over to Appearance > Editor and start modifying the .php files within their theme. They then end up with a broken site.

That is why many hosts have the theme editor turned off by default. If you don’t understand the layout and syntax of PHP, you risk easily breaking your site.

That said, there will be times that you do want to tweak certain files in your theme.

Here’s an overview of WordPress’ file structure so you can get familiar with what is where. Including the files that are commonly modified (with great care).

WordPress file locations

If you’re using cPanel web hosting you can use the File Manager interface in your cPanel to view your files. Otherwise, you can also use an FTP client like FileZilla to connect to your hosting server and view files that way.

Your website root

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

If WordPress is installed in the root folder this is where you’ll find the WordPress core files. The only files you may need to modify in the root, if you are confident that you know what you are doing, would be:

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

The /wp-admin/ directory

The /wp-admin/ directory is where all the backend WordPress dashboard files are located. There’s no reason for you to change any files there.

The /wp-content/ directory

This is where you’ll find your plugin, theme files, and uploads. (While there are other directories there as well, you most likely will never have to go into those.)

The /wp-content/themes/ directory

The themes directory is where you will find your theme files— and your style.css file. The style.css file is the file most website owners will want to modify. The style.css file contains the global font sizes, colors, layouts and spacing for your theme.

The /wp-content/plugins/ directory

The plugins directory contains plugin files.

The /wp-content/uploads/ directory

The uploads directory contains graphics and files you have uploaded for your pages and posts. Your site’s media is organized by year/month.

The /wp-includes/ directory

Rarely will there be a reason to change any files in the wp-includes directory. This directory includes the packages that are included by the WordPress core that are maintained by the WordPress core team. Your themes and plugins rely on those packages being available.

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

A word of warning

Before modifying any WordPress files, you should always make a copy of the original and save it to your hard drive. This way, if you do not like the results you can easily restore the entire original code and go back to the drawing board.

New to WordPress? WordPress Hosting from GoDaddy includes free WordPress training videos. Find out more about GoDaddy’s WordPress Hosting plans.

Already a WordPress Hosting customer? Sign in to work on your site

Image by: kevin dooley via Visual hunt / CC BY

Judith Kallos
Judith is an established Business Coach and WordPress Consultant who has run The IStudio® for more than two decades. She assists Netrepreneurs who want to create effective websites while tutoring them on the best practices that are necessary to their long-term prosperity. You can also find her extending a helping hand as a Community Founder and Trusted Advisor over on GoDaddy's Community Forums.