Skip to Main Content

How to manage WordPress files and folders

Divi: the easiest WordPress theme to use

Divi: The best WordPress theme of all time!

With over 901.000 downloads, Divi is the most popular WordPress theme in the world. It is complete, easy to use and comes with more than 62 free templates. [Recommended]

Would you like to know how to manage WordPress files and folders?

While it is quite possible to interact with your WordPress website only through the dashboard, understanding how its files and folders are organized is crucial to achieving a higher degree of control over these.

At least, this understanding will make it much easier for you to solve recurring errors on WordPress.

Each WordPress installation has the same directory structure and files. Every plugin or WordPress theme you install, every script you add, and every error window that appears, is possible thanks to the CMS structure.

If you've never installed WordPress, find out How to Install a WordPress Blog in 7 Steps

While the idea of ​​digging through these files may seem daunting at first, it's a lot easier than it looks.

In this tutorial, we will review the contents of the most important WordPress folders, paying particular attention to the basic files on which your website is based.

Presentation of the WordPress folder structure

The structure of WordPress files is honestly quite simple at higher levels (the root). You have your public_html folder, where its three key folders are located, as well as a lot of important files like wp-config.php and .htaccess.

Even if it's your first time rummaging through WordPress files, you may already be familiar with at least these files.

To access these files and folders, you must use the cPanel file manager of your web hosting service, or one FTP client.

In this tutorial, we will use FileZilla, but whatever you choose, here's what you'll find on the public_html folder:

manage WordPress files and folders - public-html WordPress folder

Before we jump into these three folders, let's take a look at some of the files located at the root of the public_html folder. First, we have .htaccess (abbreviation for "Hypertext Access"). It allows you to control the structure of permalinks, files, folders, and their access within your WordPress installation.

If you want to go further consult How to find the ".htaccess" file on WordPress

The contents of a default .htaccess file should look like this:

# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^ index.php $ - [L] RewriteCond% {REQUEST_FILENAME}! -F RewriteCond% {REQUEST_FILENAME}! -D RewriteRule. /index.php [L] </IfModule> # END WordPress

Then we have index.php, which will be used as your default homepage, unless it's replaced with a front-page.php or home.php: 

Public-html-index-php wordpress file organization

Another crucial folder in this directory is wp-config.php. It manages the basic WordPress configuration, and keeps your MySQL settings, passwords, and a prefix for tables.

The basic parameters should look like this:

// ** MySQL settings - You can get this info from your web host ** // / ** The name of the database for WordPress * / define ('DB_NAME', 'notarealname'); / ** MySQL database username * / define ('DB_USER', 'notarealuser'); / ** MySQL database password * / define ('DB_PASSWORD', 'notarealpassword'); / ** MySQL hostname * / define ('DB_HOST', 'localhost');

See also What changes apply to wp-config.php to secure your WordPress blog

Easily create your website with Elementor

Elementor allows you to easily create any website design with a professional look. Stop paying expensive for what you can do yourself. [Free]

Other important files on this directory are wp-activate.php, and wp-signup.php, which manage together user registration, login, and confirmation process.

We also have wp-comments-post.php (who manages the Comments and prevents duplicates), And wp-settings.php, which sets up some common WordPress variables.

After covering these, let's move on to the first of the top-level folders, "wp-admin". 

The "WP-Admin" folder

Wp-admin wordpress folder

As the name suggests, this is the folder that hosts the files that feed the WordPress administration tools. For example, admin.php (which is at the heart of the file), allows connection to the database, displays the WordPress dashboard, and performs any other essential function, such as checking whether a given user is the administrator or not. If it is, the script uses the file wp-load.php, which in turn loads the wp-config.php file:

/ ** * In WordPress Administration Screens * * @since 2.3.2 * / if (! Defined ('WP_ADMIN')) {define ('WP_ADMIN', true); } if (! defined ('WP_NETWORK_ADMIN')) define ('WP_NETWORK_ADMIN', false); if (! defined ('WP_USER_ADMIN')) define ('WP_USER_ADMIN', false); if (! WP_NETWORK_ADMIN &&! WP_USER_ADMIN) {define ('WP_BLOG_ADMIN', true); } if (isset ($ _ GET ['import']) &&! defined ('WP_LOAD_IMPORTERS')) define ('WP_LOAD_IMPORTERS', true); require_once (dirname (dirname (__ FILE__)). '/wp-load.php');

If you pay attention to the names of the files in this folder, you will find that most of them correspond to the functions available on the WordPress dashboard. For example, profile.php feeds the profile administration screen, while the theme-install.php controls the theme install panel, and plugin-install.php do the same thing for plugins.

Discover the Guide to the best WordPress plugins to install on your blog

As with the other important folders inside wp-admin, images is filled with images used in the WordPress dashboard, css and js are devoted to CSS code and JavaScript scripts respectively, and network hosts the PHP files needed for feed a multisite network.

The "wp-content" folder

This is the section where you are likely to spend more time during your relationship with WordPress. Its two most popular functions are located inside, of course we are talking about WordPress themes and WordPress plugins :

Wp-content folder WordPress

The "plugins" sub-folder

The WordPress plugins subfolder

Each plugin you upload to WordPress will have its own subfolder in the plugins folder, as seen in the example above. The content of each varies depending on the plugins.

Discover 10 essential WordPress plugins to install on your blog

For example, below we present the contents of the Akismet plugin folder:

Folder akismet plugin WordPress

The subfolder "themes"

WordPress theme folder

As with plugins, every WordPress theme you install on your website has its own folder it's installed in, and which you've probably seen before, unless you've installed each theme from the dashboard rather than using FTP.

The "wp-includes" folder

Wp-includes wordpress folder

Are you looking for the best WordPress themes and plugins?

Download the best plugins and WordPress themes on Envato and easily create your website. Already more than 49.720.000 downloads. [EXCLUSIVE]

The last folder of the WordPress directory is " wp-includes And he is a big one. This is the folder where wp-admin includes all the files needed to run the website. " wp-admin »Includes administrator functions. " wp-content »Stores all your themes and plugins,« wp-includes Is the one that harmonizes these two components.

This folder is, in fact, so important that this is where most of the basic WordPress files are stored. From the start, a fresh installation of WordPress will include more than 140 different files in the main directory, and 14 different folders, including certificates, fonts, js scripts, " theme-compat And widgets.

But before you leave, discover also How to protect yourself while blogging on WordPress

While delving into the organization of WordPress files and folders is understandably scary, with a little practice and a little research, you will come to know the ins and outs of its directories and files by heart.

This knowledge will undoubtedly come in handy in the future, especially if you need to resolve an error, or implement a simple tweak.

If you are looking for the best WordPress theme for your website and the best plugins for it, here are some solutions or alternatives that we offer.

1. BeTheme

BeTheme is a modern and professional WordPress theme, one of the best designed by its developers and this observation is easy to do. In short BeTheme will help you create any website.

betheme-theme-wordpress-multipurpose-versatile-create-site-internet

The creation of pages is intuitive, thanks to the perfect integration of a visual page builders, which will give you the possibility to organize the elements of your website, while moving them with the help of a mouse, which eliminates the need of knowledge in programming, and puts the grip on this theme WordPress available to everyone, even those with no knowledge in web development.

To improve the experience and the handling of this WordPress template, detailed video tutorials have been made available to you. These videos explain the main features of the WordPress theme, and they guide you through all the installation and customization processes.

DownloadDemo | Web hosting

Divi Builder

Divi Builder is a high quality page builder highly valued by Elegant Themes. Although it is generally used as part of the Divi WordPress theme, Divi Builder is also a standalone plugin that you can use on other WordPress themes.

Divi e1544278044306

Divi Builder allows you to edit your content using a visual interface on the front-end as well as an interface on the back-end, although most users prefer the first interface. Basically, instead of sidebars, everything is in popups and floating buttons.

It gives you access to 316 pre-designed templates spread across 40 different presentation packs, as well as the ability to save your own designs as templates.

One of the traits of Divi has always been the control over the styles it gives you. On three different tabs, you have the option to configure various settings, including responsive controls, customizable spacing,add custom CSS, because its CSS editor integrates basic validation and auto-completion. 

Download | Demo | Web hosting

3. Ultimate Membership Pro

Ultimate Membership Pro is an excellent WordPress subscription and content restriction plugin. It can manage users according to their package (free or paid) by creating exclusive access levels.

Ultimate membership pro wordpress membership plugin

It will therefore be possible to protect all the content of your website, or just part of it. It will be for example a course, a lesson, a page, a product, a category, an image, etc ...

Easily create your Online Store

Download free WooCommerce, the best e-commerce plugins to sell your physical and digital products on WordPress. [Recommended]

Its main features include: content protection, multiple levels of access, support for multiple payment gateways -PayPal, Authorize.net, Stripe, 2CheckOut, Bank Transfer-, partial content protection, and much more again…

Download | Demo | Web hosting 

Recommended Resources

Discover other recommended resources that will help you take better control of your WordPress installation.

Conclusion

Here is ! That's all for this tutorial, I hope you will now be sufficiently enlightened on the organization of folders and WordPress files.

Do not hesitate to share it with your friends on your favorite social networks, and tell us about your Comments and suggestions in the dedicated section.

You will also be able to consult our beginner's resources, if you need more elements to carry out your projects of creation of Internet sites.

...

This article features 5 comments

  1. Como faço para acessar os arquivos conforms aparecem na imagem se eu nao tenho acesso ao cpanel por conta de um erro no wordpress.?
    Would you know how to help me?

    O Vindi WooCommerce plugin depende da versão 3.0 do WooCommerce para funcionar!

    Há um erro crítico no seu site. Verifique seu e-mail para instruções.

    Learn more about debugging on WordPress.

    1. Hello Daniel Esquerdo Nascimento
      Our tutorial is only based on the Cpanel, managing your files will be very difficult if you cannot access it. If possible, try to resolve this problem and come back for this tutorial.
      We hope to have answered your concern, if not, please do not hesitate to provide us with further explanations to help you.
      cordially

  2. Hello,

    Thanks for this very clear tutorial!

    Small question: I followed your recommendations but it happens that I do not have an .htacces file
    Weird, right?
    I also performed the manipulation described in another article, namely "server - force display of hidden files", but I still do not see anything ...

    An idea ?

    A beginner.

    1. To automatically create the .htaccess file, I recommend that you go to Settings —- Permalinks and simply save the page.

Leave a comment

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

This site uses Akismet to reduce unwanted. Learn more about how your comments data is used.

Back To Top
22 shares
Share20
tweet2
Save