WordPress Directory and File Structure
Once you install the WordPress site, you will see the WordPress directory & file structure of the WordPress.
There are three main directories
- wp-admin
- wp-content
- wp-includes
Apart from these directories, there are also some files available in the WordPress root directory.
- index.php
- license.txt
- readme.html
- wp-activate.php
- wp-blog-header.php
- wp-comments-post.php
- wp-config-sample.php
- wp-cron.php
- wp-links-opml.php
- wp-load.php
- wp-login.php
- wp-mail.php
- wp-settings.php
- wp-signup.php
- wp-trackback.php
- xmlrpc.php
- .htaccess
- wp-config.php
wp-admin
wp-admin folder used to control the WordPress dashboard. This folder contains all the files of WordPress installation. wp-admin folder is responsible for the WordPress site admin dashboard, establishing a database connection.
The admin.php file is the min file of this folder, which is used to perform all important functions like whether the user is having administrative rights or not. This folder is one of the core folder of WordPress.
wp-admin folder also contains some folder and files looks like:
wp-content
The wp-admin folder contains the plugins, themes, and other uploaded content. wp-admin folder looks like this:
Whenever you will install a theme, the theme will store in the themes folder and the plugin will store in the plugins folder.
Whenever we will upload a picture it will store it in the uploads folder.
wp-includes
wp-includes contains all the necessary core files of WordPress. Which is necessary to run the website such as WordPress functions that control your posts, pages, widgets, and other features.wp-includes folder looks like this :
.htaccess
.htacces file is a server configuration file. It sued to manage the permalink structure, files of your WordPress site.
index.php
The index file loads and initializes all of your WordPress files when a page is requested by a user.
license.txt
license.txt file is the license file of the WordPress. The WordPress is a free software and is licensed under the GNU General Public License as published by the Free Software Foundation.
readme.html
This file contains the instructions to users.
wp-activate.php
This contains the following:
do_activate_header()
Function: Adds an action hook specific to the present page that fires on wp_head.
activate_wp_head
Fires before the location Activation page is loaded but on the wp_head action.
wpmu_activate_stylesheet()
Function: Loads styles specific to the present page.
activate_header
Action Hook: Fires before the location Activation page is loaded.
wp-blog-header.php
wp-blog-header.php file contains the http headers.
wp-config.php
This files contain the database configuration, including the databasename, database username, database username password and the host name.
This file looks like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
<?php /** * The base configuration for WordPress * * The wp-config.php creation script uses this file during the * installation. You don't have to use the web site, you can * copy this file to "wp-config.php" and fill in the values. * * This file contains the following configurations: * * * MySQL settings * * Secret keys * * Database table prefix * * ABSPATH * * @link https://wordpress.org/support/article/editing-wp-config-php/ * * @package WordPress */ // ** MySQL settings - You can get this info from your web host ** // /** The name of the database for WordPress */ define( 'DB_NAME', 'wptuts' ); /** MySQL database username */ define( 'DB_USER', 'root' ); /** MySQL database password */ define( 'DB_PASSWORD', '' ); /** MySQL hostname */ define( 'DB_HOST', 'localhost' ); /** Database Charset to use in creating database tables. */ define( 'DB_CHARSET', 'utf8mb4' ); /** The Database Collate type. Don't change this if in doubt. */ define( 'DB_COLLATE', '' ); /**#@+ * Authentication Unique Keys and Salts. * * Change these to different unique phrases! * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service} * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again. * * @since 2.6.0 */ define( 'AUTH_KEY', 'vrWM/+sBMlasstP3FH#!?d;^7^L:nL+ycv}o{q$-oliM,v3Sj<yJB:e7`9g@i`xe' ); define( 'SECURE_AUTH_KEY', 'jS*}5)@LE.-F}SBN>^7:o.6[=Ct73/b|,FPccuR=<id M)cO#`8L1ZG[->4bwQ7{' ); define( 'LOGGED_IN_KEY', 'Lf=i|]1npZ_y>_$Ko&]D1T(,DqGa-h~S?&~H_=p<OJtd;T*yC-~L59Z!nUWhv&Pr' ); define( 'NONCE_KEY', 'w}cU+=2>uZ!?:[>&AepeW8K[Jp;55t MDV (:Efxvf#]|i b#qQHcYi~ _CWsLAD' ); define( 'AUTH_SALT', 'c~h`ji5RAC}<s<b]im[%0v!E~]G?{H4L:sGGKAy)IqsxW5hhP$G09U#?D;RLXoz0' ); define( 'SECURE_AUTH_SALT', '{4`sU],xPz[duQW6FZ/| R+WNZ1Rmn4p{a)(N :~t^UF7xG8M`Tsw[q)xoNCQw,Y' ); define( 'LOGGED_IN_SALT', 'B`I#H8Y@Ea10/CvIP9&LU.Vwnn&r1*2:}kLa/}(F<wJ[4/NoCo<#kYnC;Zws<HZO' ); define( 'NONCE_SALT', 'LQ68U|%{BZor_!#@#`!{v@xeZ<C%1~r8I9s^/;t%!I2-G^]Ed7YHB/2Ue*+|*8h|' ); /**#@-*/ /** * WordPress Database Table prefix. * * You can have multiple installations in one database if you give each * a unique prefix. Only numbers, letters, and underscores please! */ $table_prefix = 'wp_'; /** * For developers: WordPress debugging mode. * * Change this to true to enable the display of notices during development. * It is strongly recommended that plugin and theme developers use WP_DEBUG * in their development environments. * * For information on other constants that can be used for debugging, * visit the documentation. * * @link https://wordpress.org/support/article/debugging-in-wordpress/ */ define( 'WP_DEBUG', false ); /* That's all, stop editing! Happy publishing. */ /** Absolute path to the WordPress directory. */ if ( ! defined( 'ABSPATH' ) ) { define( 'ABSPATH', __DIR__ . '/' ); } /** Sets up WordPress vars and included files. */ require_once ABSPATH . 'wp-settings.php'; |