Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

WordPress Files

Note: The file descriptions on this page are for WordPress Version 2.x

Each file appearing in this list has been sorted into its directory of origin. A description of the purpose of the file and its possible dependencies appear after each.

WordPress Root

index.php
Core WordPress index. This is the file that produces the blog output.
license.txt
The WordPress GPL license file.
my-hacks.php
Contains supplemental routines that are processed before output is produced. This is not included in the default install, but is referenced by the administration page if available.
readme.html
Pre-install information about WordPress.
wp-atom.php
Produces Atom syndication output.
wp-blog-header.php
Decides what to display based on the parameters that are passed to the blog. Included from any page that wants to display WordPress content.
wp-cron.php
wp-comments-post.php
Receives posted comments and adds them to the database.
wp-commentsrss2.php
Produces RSS2 syndication output of post comments.
wp-config-sample.php
A sample configuration file for connecting WordPress to your MySQL database.
wp-config.php
The actual configuration file used to connect WordPress to your MySQL database. This is not included in the default install, but must exist for successful operation of WordPress. You may need to edit this file to modify certain configuration settings.
wp-feed.php
Decides the type of feed to produce based on a request and re-routes to the correct feed-producing file.
wp-links-opml.php
Produces OPML output of Links that were added to the blog via the WordPress admin menu.
wp-login.php
The WordPress login page for registered users.
wp-mail.php
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, so that new email posts are accepted.
wp-pass.php
Accepts the password needed to view password-protected posts, then redirects back to the protected post.
wp-rdf.php
Produces RDF syndication output.
wp-register.php
Allows new users to register usernames in WordPress via an online form.
wp-rss.php
Produces RSS syndication output.
wp-rss2.php
Produces RSS2 syndication output.
wp-settings.php
Performs various pre-execution routines, including checking for correct installation, including auxiliary functions, applying user plugins, initializing execution timers, etc.
wp-trackback.php
Handles incoming trackback requests.
wp.php
A very simple template for displaying blog posts. Does not include a lot of the fancy but fragile features of index.php.
xmlrpc.php
Handles incoming xmlrpc commands. Among other things, this allows posting without using the built-in web-based administrative interface.

wp-admin

wp-admin/admin.php
The core of the admin files. Connects to the database, integrates the dynamic menu data, displays non-core console (dashboard) pages, etc.
wp-admin/admin-db.php
wp-admin/admin-footer.php
Contains the bottom of the admin console. Included from each of the console pages.
wp-admin/admin-functions.php
Contains various functions used by the admin console.
wp-admin/admin-header.php
Contains the top half of the admin console. Includes menu-header.php for menu logic.
wp-admin/bookmarklet.php
The pop-up page that is displayed when using the bookmarklet. Uses the default edit-form.php page for post input.
wp-admin/categories.php
Admin console page for category management. See: Manage - Categories
wp-admin/cat-js.php
wp-admin/edit.php
Admin console for post management. See: Manage - Posts
wp-admin/edit-comments.php
Admin console page for comment management. See: Manage - Comments
wp-admin/edit-form-advanced.php
Admin console page for the advanced post editing form. Included from post.php. See: Write - Write Post - Advanced
wp-admin/edit-form.php
Admin console page for the simple post editing form. Included from post.php. See: Write - Write Post
wp-admin/edit-form-comment.php
Edits a specific post comment.
wp-admin/edit-form-ajax-cat.php
wp-admin/edit-link-form.php
wp-admin/edit-page-form.php
Admin console page for editing pages. Included from post.php and page-new.php. See: Write - Write Page
wp-admin/edit-pages.php
Admin console for page management. See: Manage - Pages
wp-admin/execute-pings.php
wp-admin/import.php
wp-admin/index.php
The administrative default page. Redirects to an appropriate page based on user access.
wp-admin/inline-uploading.php
wp-admin/install-helper.php
A set of functions for database maintenance, including the popular-in-plugins maybe_create_table() and maybe_add_column().
wp-admin/install.php
Installs WordPress.
wp-admin/link-add.php
Admin console page to add links. See: Links - Add Link
wp-admin/link-categories.php
Admin console page for link category management. See: Links - Link Categories
wp-admin/link-import.php
Admin console page used to import links. See: Links - Import Links
wp-admin/link-manager.php
Admin console page for link management. See: Links - Manage Links
wp-admin/link-parse-opml.php
Contains functions used to parse an OPML file when importing links.
wp-admin/list-manipulation.js
wp-admin/list-manipulation.php
wp-admin/menu-header.php
The file used to display the menu in the admin interface.
wp-admin/menu.php
The default admin menu structure.
wp-admin/moderation.php
Contains functions related to comments moderation.
wp-admin/options.php
Admin console file that can be used to change every settings in one update.
wp-admin/options-discussion.php
Admin console page to manage options regarding comments and trackbacks. See: Options - Discussion
wp-admin/options-general.php
Admin console page to manage options regarding basic configuartion settings. See: Options - General
wp-admin/options-head.php
wp-admin/options-misc.php
Admin console page to manage options regarding file uploads, link tracking and support for custom "hacks". See: Options - Miscellaneous
wp-admin/options-permalink.php
Admin console page to manage options regarding permalinks. See: Options - Permalinks
wp-admin/options-reading.php
Admin console page to manage options regarding how the information from your site is sent to a reader's web browser or other application. See: Options - Reading
wp-admin/options-writing.php
Admin console page to manage options regarding the interface with which you write new posts. See: Options - Writing
wp-admin/page-new.php
Admin console page to create a new page.
wp-admin/plugin-editor.php
Admin console page to edit a plugin file.
wp-admin/plugins.php
Admin console page to manage plugins.
wp-admin/post.php
Admin console page to create a new post.
wp-admin/profile-update.php
wp-admin/profile.php
Admin console page to manage your profile.
wp-admin/setup-config.php
Admin console page to create the wp-config.php file for the first time.
wp-admin/sidebar.php
wp-admin/templates.php
Admin console page to edit any server-writeable file.
wp-admin/theme-editor.php
Admin console page to edit any file within a specific theme.
wp-admin/themes.php
Admin console page to manage themes.
wp-admin/update-links.php
wp-admin/upgrade-functions.php
Contains functions related to version upgrading.
wp-admin/upgrade-schema.php
Contains default MySQL tables structure and default options, used when upgrading.
wp-admin/upgrade.php
Admin console page to upgrade froma lower version to a higher one.
wp-admin/user-edit.php
Admin console page to edit a user.
wp-admin/users.php
Admin console page to manage users.
wp-admin/wp-admin.css
The default stylesheet for the administrative console.
wp-admin/xfn.js

wp-admin/images

This directory holds images associated and used by WordPress in the Administration Panels.

wp-admin/images/box-bg.gif
wp-admin/images/boxbg-left.gif
wp-admin/images/boxbg-right.gif
wp-admin/images/box-butt.gif
wp-admin/images/box-butt-left.gif
wp-admin/images/box-butt-right.gif
wp-admin/images/box-head.gif
wp-admin/images/box-head-left.gif
wp-admin/images/browse-happy.gif
wp-admin/images/fade-butt.png
wp-admin/images/notice.gif
wp-admin/images/toggle.gif
wp-admin/images/wordpres-logo.png

wp-admin/import

wp-admin/import/b2.php
Used for importing posts from b2. See: Importing Content - b2
wp-admin/import/blogger.php
Used for importing posts from Blogger. See: Importing Content - Blogger
wp-admin/import/dotclear.php
wp-admin/import/greymatter.php
Used for importing posts from Greymatter. See: Importing Content - Greymatter
wp-admin/import/livejournal.php
Used for importing posts from LiveJournal. See: Importing Content - LiveJournal
wp-admin/import/mt.php
Used for importing posts from Movable Type. See: Importing Content - Movable Type
wp-admin/import/rss.php
Used to import posts via RSS. See: Importing Content - RSS
wp-admin/import/textpattern.php
Used for importing posts from TextPattern. See: Importing Content - Textpattern

wp-content

This directory is typically not upgraded.

The /wp-content/ directory is for user-supplied content. WordPress upgrades are supposed to specifically avoid doing anything to any of the contents of this directory, unless the user wants the latest version of the default WordPress Themes.

WordPress Themes and WordPress Plugins are stored in this directory.

wp-content/plugins

All WordPress plugins are placed in this directory. The default plugin shipped with WordPress is an example plugin mostly for plugin developers, the Hello Dolly plugin, which displays random lines of the song "Hello Dolly." Current versions also inlude the Akismet comment spam fighting WordPress Plugin as an option.

wp-content/plugins/hello.php
wp-content/plugins/akismet.php

wp-content/themes

All WordPress Theme data is placed within this directory in its own folder such as example.com/wp-content/themes/themedirectory/.

wp-content/themes/themedir

All files associated with a WordPress Theme are stored in their own directory under the wp-content/themes/themedir directory. As an example of the Theme files, the typical files included in the WordPress Default Theme under /wp-content/themes/default/ would be:

wp-content/themes/themedir/comments.php
Used to manage how the comments are displayed.
wp-content/themes/themedir/footer.php
Used to manage the footer of the pages.
wp-content/themes/themedir/header.php
Used to manage the header of every page.
wp-content/themes/themedir/index.php
Used to manage how the posts are displayed in your homepage.
wp-content/themes/themedir/search.php
Used to display a search form to search for entries.
wp-content/themes/themedir/sidebar.php
Used to manage the sidebar.
wp-content/themes/themedir/style.css
The main CSS file of WordPress.

wp-content/themes/themedir/images

Some WordPress Themes store images in a subdirectory under their Theme folder. For example, images used by the default theme are in wp-content/themes/default/images/.

wp-includes

wp-includes/cache.php
wp-includes/capabilities.php
wp-includes/class-IXR.php
The Incutio XML-RPC Library. Contains XML RPC support functions. Supplied by http://scripts.incutio.com/xmlrpc/
wp-includes/classes.php
Contains basic classes including the core post-fetching mechanism, WP_Query, and the rewrite manger, WP_Rewrite.
wp-includes/class-pop3.php
Contains a support class for accessing POP mailboxes. Used by wp-mail.php
wp-includes/class-snoopy.php
Snoopy is a PHP class that simulates a web browser. It automates the task of retrieving web page content and posting forms, for example.
wp-includes/comment-functions.php
wp-includes/default-filters.php
wp-includes/feed-functions.php
wp-includes/functions-compat.php
Contains support functions that are present in newer PHP versions that are used only when running on older PHP versions.
wp-includes/functions-formatting.php
Contains support functions for cleaning XHTML and formatting text correctly in certain character sets.
wp-includes/functions-post.php
Contains support functions for managing posts in the database, querying user capabilities, fetching and writing comments, etc.
wp-includes/functions.php
Contains numerous vital support functions. Largest file in WordPress -- almost double the next largest file.
wp-includes/gettext.php
Part of the PHP-gettext GPL translation library.
wp-includes/kses.php
Contains functions that are used to render and filter HTML in posts or comments.
wp-includes/links.php
Contains functions that are used to manage and use the Links feature of WordPress.
wp-includes/locale.php
Contains functions to replace default weekdays and months values.
wp-includes/pluggable-functions.php
wp-includes/registration-functions.php
wp-includes/rss-functions.php
wp-includes/streams.php
Contains a class to wrap file streams, string streams.
wp-includes/template-functions-author.php
Contains theme functions related to the author of a post or a comment.
wp-includes/template-functions-category.php
Contains theme functions related to categories.
wp-includes/template-functions-comment.php
Contains theme functions related to comments.
wp-includes/template-functions-general.php
Contains general theme functions.
wp-includes/template-functions-links.php
Contains theme functions related to links
wp-includes/template-functions-post.php
Contains theme functions related to posts.
wp-includes/template-functions.php
Contains all the "template-" files above.
wp-includes/template-loader.php
wp-includes/vars.php
Used to set miscellaneous variables.
wp-includes/version.php
Used to set the currently used WordPress version.
wp-includes/wp-db.php
Contains functions used to connect to the MySQL database.
wp-includes/wp-l10n.php
Contains functions used in multi-language support.

wp-includes/images

wp-includes/images/smilies

This is the directory that holds the smilies (emoticons) used in WordPress if the option is turned on. See Using Smilies for the full list.

wp-includes/js

wp-includes/js/quicktags.js
Javascript file that contains functions to manage the tags toolbox when editing posts or pages.

wp-includes/js/tinymce

This directory includes the files that run the Rich Text Editor in the Write Post panel.

wp-includes/languages

See: WordPress Localization

This article is marked as in need of editing. You can help Codex by editing it.