Understanding WordPress’ Files and What They Do

Posted OnAug 1, 2014     CategoryDevelopment     CommentsNo comment

In this article we’ll be discussing the files and folders that make up WordPress, to give you a better understand of how it’s pieced together.

Please note: For this article you will need to navigate to the area where your WordPress files are located.
For example: The ISP who hosts your website.

Step 1) Navigate to your WordPress folder and double-click to display the contents.

WP Files Explained

WordPress Root Folder Files

We recommend that the majority of these files never be changed, though this naturally excludes wp-config.php – however we must advise that caution is recommended when making any changes to this file.

index.php This is the file that produces the blog output.
license.txt This is the WordPress GPL license file for your WordPress installation.
readme.html This file contains pre-installation information about WordPress.
wp-activate.php This file confirms that the activation key that was sent in an email after a user signed up for a new blog matches the key for that user and then displays confirmation.
wp-blog-header.php This file loads the WordPress environment and template.
wp-comments-post.php This file handles Comment Posts to WordPress and prevents duplicate comment posting.
wp-config.php This file is used by the wp-config.php creation script during the installation and contains the configuration for MySQL, Secret Keys, WordPress Language and ABSPATH.
wp-config-sample.php This is a sample of the wp-config.php file.
wp-cron.php This is a WordPress Cron Implementation for hosts which do not offer CRON or for which the user has not set up a CRON job pointing to this file.
wp-links-opml.php This file outputs the OPML XML format for getting the links defined in the link administration. This can be used to export links from one blog over to another. Links aren’t exported by the WordPress export, so this file handles that.
wp-load.php This is a bootstrap file for setting the ABSPATH constant and loading the wp-config.php file. The wp-config.php file will then load the wp-settings.php file, which will then set up the WordPress environment.
wp-login.php This file handles authentication, registering, resetting passwords and forgot password issues.
wp-mail.php This file is used for obtaining blog posts that were submitted via email. The URL of this file is usually added to a cron job so that it is regularly retrieved, and new email posts are accepted.
wp-settings.php This file is used to set up and fix common variables and include the WordPress procedural and class library.
wp-signup.php This file sets up the WordPress area where people can sign up to your WordPress blog.
wp-trackback.php This file handles Trackbacks and Pingbacks sent to WordPress.
xmlrpc.php This file is the XML-RPC protocol support for WordPress.

The wp-admin Folder

The folders and files located inside the wp-admin folder make up the WordPress Dashboard (Admin Panel) and other associated Administrative tasks.

Modifications or deletions to any of these folders/files may cause the Dashboard or Administrative tasks such as an upgrade to not function or display as expected.

km-wp-files-explained-02

The wp-content Folder

  • The wp-content/pugins Folder

    Each time a plugin is installed a new folder is created inside the plugins folder that contains all the required files to make the plugin work.

    New plugins can be installed through the Dashboard (Admin Panel) by navigating to Plugins -> Add New or by using an ftp program and uploading the plugin files to this folder.

    km-wp-files-explained-03

  • The wp-content/themes Folder

    When WordPress is installed, the theme folders shown below are installed by default.

    A new theme can be selected from the Dashboard (Admin Panel) by navigating to Appearance -> Themes -> Add New or by using an ftp program and uploading the theme files to this folder.

    km-wp-files-explained-04

  • The wp-content/upgrade Folder

    When an upgrade is needed for WordPress, and you click the upgrade hyperlink from the Dashboard (Admin Panel), the upgrade files are installed to this folder.

  • The wp-content/uploads Folder

    When WordPress was installed the option in the Settings -> Media area was set for all files uploaded to the Media Library to be organized by year – month as shown below.

    To change this structure, navigate to Settings -> Media Settings and remove the check mark to the left of Organize my uploads into month and year based folders.

    km-wp-files-explained-05

The wp-includes Folder

This folder contains everything needed to run WordPress via the front-end. It is the territory of WordPress Core, and as the adage goes, never modify core under any circumstances.

km-wp-files-explained-06

 

 

Leave a Reply

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

Send this to friend