WordPress

On this page 7

WordPress is an open-source content management system written in PHP that stores content in a MySQL or MariaDB database and renders it as web pages, feeds and API responses. Among Web applications it occupies a distinct position: it is a server-rendered, database-driven platform that began as blogging software in 2003 and grew into a general framework for websites, online stores, membership portals and headless content backends on the Web.

Its importance comes from scale and extensibility. WordPress runs a large share of all public websites, commonly estimated at around two fifths, and it achieves this through a plugin and theme architecture built on hooks, which lets developers change almost any behavior without editing the core code.

How WordPress processes a request

WordPress handles each request through a single front controller, the file index.php, which loads the core, the active plugins and the active theme before deciding what to show. The WP_Query class translates the requested URL into a database query, and the template hierarchy selects the theme file that renders the result, for example single.php for one post or archive.php for a category listing.

Throughout this cycle, WordPress fires actions and filters, collectively called hooks. An action lets code run at a defined moment, such as when a post is saved, while a filter lets code modify a value, such as the title or the final HTML, before it is used. This event-driven hook system is the reason thousands of independent plugins can coexist in one installation.

The following table lists the main architectural components and the role each plays in a typical installation.

ComponentRoleWhere it lives
WordPress coreRouting, users, content model, hookswp-admin and wp-includes folders
DatabasePosts, metadata, options, users, taxonomiesMySQL or MariaDB tables
ThemesPresentation and templateswp-content/themes
PluginsAdded features and integrationswp-content/plugins
REST APIJSON access to content and settingsEndpoints under /wp-json/
Block editorVisual editing with Gutenberg blocksJavaScript bundled with core
Core components of a WordPress installation

The WordPress content model and editing experience

Everything in WordPress is stored as a post object in the wp_posts table, distinguished by a post type such as post, page, attachment or a custom post type registered by a plugin. Additional fields live in post metadata, and classification uses taxonomies such as categories, tags or custom taxonomies. This generic model is flexible, but heavy metadata queries can become slow on large sites.

Since version 5.0, content is edited in the block editor, known as Gutenberg, which saves each piece of content as HTML annotated with block comments. Full site editing extends blocks to headers, footers and templates through block themes configured with a theme.json file, which reduces the need for PHP template code.

The table below compares the main ways a WordPress site can be built and presented.

ApproachHow pages are producedTypical use
Classic themePHP templates rendered on the serverEstablished sites and custom agency builds
Block themeBlock templates edited visuallyNew sites managed by editors
Page builder pluginProprietary layout engine on top of a themeMarketing sites built without code
Headless WordPressSeparate front end calls the REST API or GraphQLApps built with React or Next.js
Ways to build the front end of a WordPress site

WordPress compared with other web application approaches

WordPress is a traditional multi-page application: by default the server renders complete HTML for every page, which suits content sites and search engine indexing. It differs from a single-page application built with React, Vue.js or Angular, where the browser renders views through client-side rendering, and from static site generators, which build pages ahead of time.

The comparison below places WordPress next to neighboring concepts in web application architecture.

OptionRendering modelMain strengthMain trade-off
WordPressServer-side rendering per requestEditorial tools and plugin ecosystemNeeds caching and constant patching
SPA frameworkClient-side rendering in the browserRich interactivityNo built-in content editing
Static site generatorPages built at deploy timeSpeed and small attack surfaceRebuilds required for changes
Next.js with headless CMSHybrid SSR, SSG and incremental static regenerationModern front end with managed contentTwo systems to operate
WordPress and related architectures

In headless deployments, WordPress keeps the editorial back office while a framework such as Next.js or Astro renders the public site. This combination brings modern performance techniques such as hydration and islands architecture, but it removes most theme and plugin front-end features, so previews, forms and SEO tooling must be rebuilt.

Running WordPress in production

A production WordPress site needs a PHP runtime, a web server such as Nginx or Apache, a database and, in practice, several caching layers. Without caching, every page view executes PHP and multiple database queries, which limits throughput to a modest number of requests per second on ordinary hardware.

  • Page caching stores complete HTML so anonymous visitors bypass PHP entirely.
  • Object caching with Redis or Memcached keeps the results of repeated database queries in memory.
  • Opcode caching with OPcache keeps compiled PHP in memory between requests.
  • A content delivery network serves images, scripts and often cached pages from locations near the visitor.

Hosting ranges from shared plans to managed WordPress hosting and container platforms. The choice depends mainly on traffic, the number of logged-in users, who cannot be served from page cache, and how much operational responsibility the owner wants to keep.

Security risks and common mistakes with WordPress

The WordPress core is actively maintained and patched quickly, yet most compromised installations are breached through outdated or poorly written plugins, weak administrator passwords or abandoned themes. Its popularity makes it a constant target of automated scanning, so neglect is punished faster than on rarer platforms.

The table summarizes frequent problems, their usual cause and the corrective practice.

SymptomUsual causeRecommended fix
Malware or spam links injectedVulnerable plugin left unpatchedAutomatic updates and fewer plugins
Slow page loadsNo page cache, heavy page builderFull-page caching and lighter theme
Brute-force login attemptsPredictable admin credentialsStrong passwords and two-factor login
Broken site after updateUntested plugin conflictsStaging copy and tested rollouts
Bloated databaseRevisions, transients and orphaned metadataScheduled cleanup and revision limits
Typical WordPress problems and fixes

A frequent misconception is that WordPress is only a blogging tool. In practice it is a general application platform, but treating it as a full framework for complex transactional systems often leads to technical debt, because its generic data model and plugin dependencies are hard to scale for heavy custom logic.

The idea in brief

WordPress is software that lets people run a website without writing every page by hand. Authors type and arrange content in a visual editor, and WordPress stores it and turns it into web pages whenever someone visits.

Think of it as a furnished house with removable walls. Themes decide how the rooms look, and plugins add new rooms such as a shop or a booking desk. The key point is that this flexibility needs regular maintenance: updates, backups and careful choice of add-ons keep the house safe.

A practical scenario

A regional museum wants a site where curators publish exhibitions, staff sell tickets and visitors browse a collection of about 4,000 objects. The developer installs WordPress with a block theme, registers a custom post type for collection objects with taxonomies for period and material, and adds an established e-commerce plugin for ticket sales.

To handle a spike of visitors during exhibition openings, the team enables full-page caching, an object cache with Redis and a content delivery network for images. Updates are tested on a staging copy every week before going live. The result is a site that curators edit without developer help and that serves several thousand visitors per hour from cached pages while ticket checkout runs dynamically.