 Welcome to this lesson on the WordPress file structure. Like most software applications, WordPress is made up of a collection of files organized into a specific structure. Because WordPress is open source, when you download the archive of the latest version of WordPress, you're able to see and inspect all the files. Let's explore the root directory of a WordPress installation in Visual Studio Code, a free and open source code editor. The root directory of a WordPress site contains three top level directories and a series of files. First, let's look at some of those files. The hdaccess file is a special file that is used to configure the Apache web server for a specific WordPress installation. It is essentially an extension of the Apache virtual host configuration that you looked at earlier. Any valid Apache directives can be added to this file and will be applied for this WordPress installation. It's worth noting that nginx does not support the use of an hdaccess file like configuration on a per WordPress level. Instead, the configuration is done in the main server block configuration file. This is one of the reasons that nginx is considered to be faster than Apache, but also what makes it less configurable by the site owner. The license.txt file contains the open source license information for WordPress. WordPress is licensed under the open source GNU general public license, version two. This license allows anyone to use, modify and redistribute WordPress. The readme.html file contains information about WordPress, including sections on installing and updating WordPress, system requirements and links to various online resources. As an HTML file, it's best viewed in a web browser. Now let's move on to the PHP files that control a typical WordPress request. As you learned in the web service lesson, the index.php file is the directory index file and it is executed where the user visits the root URL of this WordPress site. When the code in index.php is executed, it also includes the code in the wp-blog-header-php file. As you can see, wp-blog-header includes wp-load, which in turn includes the wp-config file. The wp-config file is the main configuration file for a WordPress site. It contains all the configuration options that are required to run WordPress, like database connection information, security keys and any custom configuration options that you may want to add. wp-config then includes the wp-settings file, which sets up all the WordPress core functionality. There are some additional PHP files in the root directory that perform specific functions outside of regular WordPress requests. These files are usually accessed directly by either a user or some other function and are not included in the normal WordPress request flow. wp-activate.php is used to confirm the activation key that is sent in an email after a user signs up for a new site. Typically this would be used if you were setting up a WordPress install yourself or managing a multi-site network. wp-comments-post.php is used to process any comments that are submitted on a WordPress site. wp-cron is used to run any scheduled tasks that are set up on a WordPress site. This file is executed every time a WordPress page is requested and checks to see if there are any scheduled tasks that need to be run. If there are, it runs them. The wp-links-opml file is used to generate an XML list of links. This was used by a link manager feature that was removed in WordPress 3.5. However, it's still possible to enable this functionality using the link manager plugin. And so this file is still included for backwards compatibility. wp-login.php is used to display the login form for a WordPress site. It also processes any login requests that are submitted. wp-mail is used by the post via email feature of WordPress. This feature allows you to publish posts to your WordPress site by sending an email to a specific address. If enabled, this file is executed every time an email is received to create a new post. wp-signup is used to display the signup form for a new site on a WordPress multi-site network. wp-trackpack is used to process any trackback requests that are sent to a WordPress site. Trackbacks are a way for one website to notify another that it has been linked to, usually in a post content or in a comment. Finally, the XMLRPC.php file is used to process any XMLRPC requests that are sent to a WordPress site. XMLRPC is a remote procedure called protocol that allows software to make requests to a WordPress site. This is used by the WordPress mobile app, but you can disable this functionality if you don't use that app to manage your site. Above these files, the root directory of WordPress installation also contains three directories. wp-admin contains all the files that power the WordPress admin interface. Whenever you're interacting with a WordPress admin, you're using files from this directory. wp-content contains any files that can be added to a default WordPress install. This includes any plugins, themes, and uploaded files. Any directories that plugins need to create to store additional files are also created in this directory. wp-includes contains the bulk of the core WordPress files. This includes all the PHP files that make up WordPress core, as well as any JavaScript and CSS files that are required to run WordPress. Common functionality like the database API, HTTP API, and plugin APIs are all included in this directory and are used by both the WordPress admin and most front-end requests.