How WordPress Works – a short lesson

WordPress is known as a content management system (CMS).

Its made up of a database (usually a MySQL database) and a bunch of files (PHP files, HTML files, images etc).

The database stores all the data unique to that website eg. post content, page content, user details, category names etc.

Most of the files are part of the WordPress installation (common to every WordPress installation), but some belong to the theme and plugins you have installed and the images you have uploaded.

WordPress

You should never change any files in the wp-admin or wp-includes folders. These files provide all the WordPress functionality that comes ‘out of the box’.

You can add functionality to WordPress (eg. add a shopping cart, a contact form, custom fields, a new content type such as testimonials etc) by adding plugins to your WordPress installation.

Functionality is also extended by the theme you install. It is common to restrict theme functionality to styling only (eg. colour scheme, fonts, structure) and extend non-styling functionality via plugins. By following this rule, you can safely change your theme and not lose any functionality.

Use ‘Pages’ for content on your site that doesn’t change very often eg. the contact page, the about page etc. The format of pages comes from the page template, generally page.php in your theme files.

Posts are for content that is time-based (generally) eg. blog, articles, news. Your theme provides an archive template (the archive.php file provides structure and formatting) that lists post introductions on a page (generally an image, an article excerpt and a ‘read more’ button). Once you click the ‘read more’ button, you are viewing what is commonly referred to as the ‘single’ template.

The header (header.php) and footer (footer.php) are generally the same on every page. The header contains the logo, slogan (tagline), and the menu. The footer often contains links, social media links and contact info.

Widgets are predefined sections of the website (they differ per theme). For example, you may have a ‘header right’ section that appears in the upper-right of the header. You can define the content for the widget in the ‘widgets’ area of the Dashboard and then it shows on every page of the website.

Elementor Logo

Create any website you can image