How WordPress Works

This article is part of the WordPress Curriculum on

If you only know HTML, CSS, and JavaScript, it can be challenging to wrap your head around how WordPress works. With HTML, CSS, and JavaScript, you create and publish files to a hosting server. With WordPress, the website content and settings are not stored in the website files. Instead, the content is stored in database tables. In this article we’ll explain what the database tables are and how the website files interact with them.

You may have initially learned to make websites in HTML and CSS. When you publish those websites, you move all of the website files to a hosting server and that’s when you can see them live. All of the website files are stored in the web server. 

WordPress uses a hosting server as well but the arrangement is much more complicated. It uses website files, but it stores the website content in a database and retrieves that content when a web page loads.

WordPress Uses PHP and MySQL

PHP stands for: “PHP: Hypertext Preprocessor”. PHP is a server-side programming language. (JavaScript is a client-side programming language.) When writing code, when the programmer needs to access something from the database, he/she switches from the HTML to the PHP language. 

The PHP code is used to get data out of a MySQL Database and insert it into the HTML on the web page. PHP code compiles to HTML, CSS, and JavaScript for a browser. 

MySQL is a relational database. Think of a database as bunch of spreadsheets (tables) that store data. The database is a set of tables where all of the website content is stored. The list at right is a list of tables in a typical WordPress website. As you can see, there are a lot of them. 

A screenshot of all of the tables in a WordPress database. The highlighted table is the posts table.
A screenshot of all of the tables in a WordPress database. The highlighted table is the posts table.

For now, note the highlighted table called wpmq_posts. This is where the posts (web pages) are stored. Whenever someone adds a Post or Page in WordPress, a new row is added to the wp_posts table. On this website, the table is named wpmq_posts for security reasons. but it is the same as the wp_posts table. If you have cPanel, you can access the tables in phpMyAdmin.

If this seems complicated, don’t worry! Most owners of WordPress websites aren’t even aware of the tables. For non-developers who use WordPress, how the data is stored is a black box for them.

Use PHPmyAdmin to View the Database Tables 

If you have cPanel, then you can use the PHPmyAdmin tool to view and and edit the table rows. (If you don’t have cPanel, your website hosting will undoubtably have a different tool that will allow you to view the MySql Tables.)

As you can see in the screenshot below, a database table is like a spreadsheet table, like Excel, Numbers, or Google Sheets. Each row is another post (web page) on the website.

WordPress Folders and Files

Just like the websites you may have made with HTML, CSS and JavaScript, WordPress also uses folders and files. These files contain HTML, CSS, JavaScript, and PHP. They don’t contain the website content…the PHP scripts inside of the HTML grabs the website content out of the tables.

Here are the folders and files you will see in a typical WordPress installation. Note that instead of an index.html file there is an index.php file. Website files that include PHP use the .php extension instead of .html.

See the WordPress Files with Chrome Inspector

You can use Developer Tools to see if a website was made with WordPress. 

Click on Sources in the Dev Tools, and look for folders that start with wp. 

WordPress Started as a Blogging Platform

To understand how WordPress works, you need to know a bit about blogging. WordPress began its life as a blogging platform in 2003, and then evolved to more general use. This history is evident throughout WordPress.

Matt Mullenweg and Mike Little were the initial developers. In the early years, you could only use WordPress for blogging. The home page was a list of blog posts website visitors could click into. Over the years, more and more functionality was added, so that today it is much more than a blogging platform. 

What is a blog, anyway?

A blog is a sort of like a website journal. A blogger writes regular posts about their topic of expertise. Here are some types of bloggers:

Recipe blogger: Each recipe is a blog post.

Travel blogger: Each location or trip is a blog post

Craft blogger: Each craft is a blog post

Bloggers make money by putting advertisements on their websites. This is a food blogger I support who writes posts about recipes and gardening. This is a team of people who write blog posts about video games from a Christian perspective. On my website for students, I have a section devoted to a blogging. Only part of the website is a blog. 

As you can see, each of these blogs has a specific topic and posts that relate to that topic. 

Many businesses have blogs that supplement their business websites. They write articles about their area of expertise because it’s a great way to get traffic to their website from search engines, like Google.

Here are a few examples of companies that may have a blog as part of their business website:

  • A plumbing company would write articles about plumbing problems, and that would increase traffic to their website. 
  • A landscaping company may write blog post about various high-end landscaping projects, to showcase their work and get more customers. 
  • A pest control company blogs about the various insects and animals that is helps to control.

As you can see, only a subset of websites are blogs or include a blog. A typical business website probably doesn’t include a blog, unless blogging is part of their marketing strategy.

The “real” WordPress is

The “real” WordPress comes from is for developers and business websites. is the home for the real WordPress blogging platform. is a for-profit company run by Automattic. It is used by a small subset of WordPress users. 

The point is that when you hear someone talking about WordPress, they almost certainly are referencing, not In the image below, you can see the relative importance of and in little letters. in big letters. in little letters and in big letters, showing the relative importance of the two.

So, what is is a product of Automattic

Automattic is a for-profit business led by Matt Mullenweg, one of the creators of WordPress. One of its products is, a platform that uses a version of the open source WordPress code to sell websites. Most WordPress users do not use has a limited free level. To move to your own domain, you need to pay WordPress also provides website hosting. 

Automatic also owns WooCommerce, JetPack and other WordPress plugins. Of note, WooCommerce is a free plugin and has made WordPress the leading e-commerce platform. 

Automattic is a much-loved part of the WordPress community. It provides significant support to  Matt Mullenweg gives an annual presentation each year called, “State of the Word”. He is one of the primary leaders of and his company does a lot of work to support

Understanding a bit about how WordPress is structured and its history as a blogging platform is important for a true comprehension of WordPress.