What is WordPress? The technical stack explained

WordPress powers almost half of all websites on the internet, with over 400 million sites built on it. For many users, WordPress is simply a dashboard for writing posts and installing themes. But for developers, understanding what is happening underneath that dashboard is essential, particularly when you need to set up a local development environment or work with a WordPress codebase directly.

This article explains what WordPress is, the technical stack it is built on, and how it is structured under the hood.


What is WordPress?

WordPress is a Content Management System (CMS), a web application that allows users to create, manage, and publish content without needing to write code. It was created in 2003 and has grown to become by far the most widely used CMS in the world. A large number of web hosting companies offer cheap WordPress hosting packages, giving customers the ability to build and update a website without any coding knowledge.

This simplicity hides a more complex technical stack underneath. When WordPress is hosted by a web hosting company, that underlying stack is managed for you and largely invisible. When you move to local development, you need to understand and recreate it yourself.


The technical stack underneath WordPress

WordPress is built on the LAMP stack, a combination of free and open-source technologies that work together to serve dynamic web pages. The four components are:

  • Linux — the operating system used by most web hosting servers
  • Apache — the web server software that handles incoming requests
  • MySQL or MariaDB — the relational database where all content is stored
  • PHP — the server-side scripting language that generates web pages dynamically

A newer alternative to Apache is NGINX (pronounced “engine-x”), which forms part of what is known as the LEMP stack. Some hosting environments use NGINX instead of Apache for its performance under heavy traffic.

For a more detailed overview of LAMP, LEMP, and related stacks, see A developer’s guide to tech stacks: LAMP, MEAN and beyond.

WordPress includes a configuration file called .htaccess which is used to configure the Apache web server, handling URL rewriting for clean permalinks among other things. If you are using NGINX instead of Apache, the configuration is handled differently, typically in an nginx.conf file.


How WordPress generates pages

WordPress does not serve static HTML files. Instead, when a visitor requests a page, PHP code runs on the server, queries the MySQL or MariaDB database for the relevant content, combines it with the active theme’s templates, and generates an HTML page that is sent to the browser. This happens on every page request.

This is why setting up a local WordPress environment is more involved than simply copying files to your machine. You need a running web server, a database server, and PHP all working together, the same stack that the hosting server provides.


WordPress file structure

A WordPress installation is organised into three main directories and a set of root-level files. Understanding this structure is useful when troubleshooting, developing themes or plugins, or migrating a site.

wp-admin

Contains all the files that power the WordPress admin dashboard. Everything you see and do when logged into the WordPress backend runs from this directory. Unless you are a developer customising the admin interface, there is no reason to edit anything in this folder. Modifying or deleting files here can break your site.

wp-includes

Contains the core WordPress code: the libraries, functions, and classes that make WordPress work. This is the engine room of the application. These files are not intended to be modified directly.

wp-content

This is the directory you will work with most as a developer. It contains everything that can be added to or customised in a WordPress installation:

  • themes — the theme files that control the appearance of the site
  • plugins — installed plugins that extend WordPress functionality
  • uploads — media files uploaded through the WordPress dashboard, organised by year and month

Importantly, wp-content is the only directory you should modify. It is also the directory that persists when WordPress core is updated, meaning your themes, plugins, and uploads are not overwritten during an update.

Key root-level files

  • wp-config.php — the main configuration file. It contains the database connection details, security keys, and other global settings. This file is generated during WordPress installation and should never be committed to a public repository.
  • index.php — the entry point for all WordPress requests. It loads the WordPress core and initiates the page generation process.
  • .htaccess — the Apache configuration file, used primarily for URL rewriting to enable clean permalink structures.

Why local development requires recreating the stack

Because WordPress depends on a web server, a database, and PHP running together, setting up a local development environment means recreating that same stack on your own machine. There are several ways to do this, from tools like MAMP and XAMPP that bundle everything together, to running the stack inside Docker containers.

For a practical guide to setting up WordPress locally using Docker, see Setting up WordPress locally with Docker.


Further reading


Posted

in

, ,

by