WordPress Overview and Structure
Posted 17th November, 2020
WordPress is the most popular online website creation software, running approximately thirty percent of all websites on the internet. It allows anyone, from beginners with no technical ability, to experienced web designers, to create a fully functional and powerful website quickly and easily.
Contents
- Overview and History
- Structure
- Core files
- Content
Overview and History
WordPress was created in 2003 as a blogging tool. It became a popular way of creating a site quickly and easily, and evolved to a powerful content management system.
Because of the ability to add plugins and extend the application - for example with shopping cart functionality, or as a portal for real estate agents - thousands of free and paid resources and extensions were created.
Structure
Like most websites, WordPress consists of files and a database. The database stores website content and settings, whereas the files contain the logic and styling of the site. For files, WordPress uses a tree structure like with any set of folders and files.
An index.php
in the home directory is called by site visitors.
WordPress file architecture can be easily divided into two main sections:
- The WordPress Core includes all main containers and WordPress functions. This core is identical for every WordPress website.
- The WordPress Content includes templates, media, plugins. These can be unique for every WordPress site.
Core
The core consists of all files and folders of a WordPress installation excluding the wp-content
directory.
Some key files include:
- .htaccess: A .htaccess file tells a web server how to handle requests. While not a specific WordPress file, missing content or an error can cause a website to have broken navigation or to not load at all.
- wp-config.php: The main WordPress configuration file, this establishes the connection between the database and the files.
- wp-login.php: This is the WordPress login page for the admin area.
- wp-admin/. This is the WordPress admin area. An issue with this directory will cause the WordPress admin area to go offline.
- wp-includes/. This directory holds core functions of WordPress - everything from enabling cache, to emojis, to template functions.
The core files are fully replaceable. If an issue occurs with any of them, they can easily be replaced with a freshly downloaded WordPress install. Take care not to overwrite any of the Content components, and update the configuration in your wp-config.php file if you replace that.
Replacing the core files with the latest WordPress version would also upgrade your WordPress website.
Content
WordPress content files site within the wp-content directory. The following sub-folders are self-descriptive:
- /uploads. Media files are placed here. They can be directly uploaded, though are usually stored in a structure based on the year and month of the upload of the media files.
- /plugins. All WordPress plugins are placed in this directory. The folder names equate to the plugin name.
- /themes. WordPress theme data is placed within this directory, in individual folder