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, along with a lot of important files such as wp-config.php
et .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 a FTP client.
In this tutorial, we will use FileZilla, but whatever you choose, here's what you'll find on the public_html 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 is changed to a front-page.php
ou home.php
:
Another crucial folder in this directory is wp-config.php
. It handles basic WordPress configuration, and stores your MySQL settings, passwords, and table prefix.
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
Other important files on this directory are wp-activate.php
, and wp-signup.php
, who manage together user registration, login, and confirmation process.
We have also wp-comments-post.php
(who manages the Comments and prevents duplicates), And wp-settings.php
, which sets up some common WordPress variables.
After covering those, we'll move on to the first of the top-level folders, " wp-admin
».
The "WP-Admin" 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 file wp-config.php
:
/**
* 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 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 :
The "plugins" sub-folder
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:
The subfolder "themes"
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
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.
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.
In order 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 walk you through all the installation and customization processes.
Download | Demo | 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 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 former interface. Basically, instead of sidebars, it's all 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.
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 ...
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.
- How to restrict WordPress media access to certain users
- How to permanently delete a WordPress website
- How to properly uninstall a WordPress plugin
- How to indent paragraphs on WordPress
- 5 WordPress calendar plugins for a blog
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.
...
Hello
I have a .pdf file which is at the root of my blog (depending on the address) and I would like to delete it but I cannot access it. Can you tell me how to do it?
Thank you in advance for your assistance!
https://www.droledemaman.com/6histoires.pdf
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 critical no seu site. Verifica seu e-mail para instruções.
Learn more about debugging on WordPress.
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
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.
To automatically create the .htaccess file, I recommend that you go to Settings —- Permalinks and simply save the page.