Skip to content

Everything for WordPress, web development — and beyond

What programming language is WordPress written in

What programming language is WordPress written in

When people ask what language WordPress is written in, there's almost always another question behind it: "Where should I start if I want to understand it?" That's the right approach.

WordPress development isn't magic or a members-only club. It's a stack of five technologies, four of which are familiar to any front-end developer. The fifth, PHP, runs the core, themes, plugins, and all server-side logic. But you won't be learning "one language." You need to understand how they work together and the right order to learn them.

💡 Quick overview:

  • The WordPress core is written in PHP. Data lives in MySQL. This is the server side, hidden from the user.
  • In the browser, the page is built from HTML (structure), CSS (styling), and JavaScript (interactivity): three front-end technologies.
  • Learn the stack in this order: HTML, then CSS, then PHP, then JavaScript, then SQL. From simple to complex.

PHP, the engine of WordPress

The WordPress core consists of tens of thousands of lines of PHP code. When a browser requests a page, the server executes PHP scripts, retrieves data from the database, passes it through theme templates, and returns ready-made HTML. The user never sees the PHP code; they receive the already-assembled page.

Example of PHP code with variables and conditional logic

PHP in WordPress works like a conductor: it "orchestrates" the HTML, calls database functions, inserts settings from the admin panel, and assembles the final page. Any theme template is a PHP file with embedded HTML. Any plugin is a PHP file that hooks into the core via add_action and add_filter.

Without PHP, WordPress simply won't run. So the answer to the title question is clear: WordPress is written in PHP. But that's not the only language a developer needs.

HTML, the skeleton of every page

HTML isn't a programming language; it's a markup language. It doesn't "compute"; it describes structure: where the heading is, where the paragraph is, where the image is, where the button is. The browser reads HTML markup and turns it into a visible page.

In WordPress, HTML isn't stored as separate files. Theme templates are written in PHP, but they output HTML. When you edit a page in Gutenberg, the editor saves content to the database, but visitors still receive HTML.

1<html>
2 <head>
3 <meta charset="UTF-8" />
4 <title>Page title in search</title>
5 </head>
6 <body>
7 <h1>Page heading</h1>
8 <p class="intro">Introduction paragraph text</p>
9 </body>
10</html>

The key feature of HTML is tags. Each tag has its role. <h1> is a first-level heading. <p> is a paragraph. <a> is a link. A closing tag with a forward slash (</h1>) shows where the element ends. Some tags, like <meta> or <img>, are self-closing: they don't need a pair.

HTML tags can have classes: class="intro" in the example above. A class is an "anchor" for CSS. The browser finds all elements with that class and applies styles from the CSS file.

In short: HTML defines what the user sees on the page. But how it looks is determined by CSS.

CSS, the clothing of a website

CSS stands for Cascading Style Sheets. If HTML gives the page structure, CSS gives it color, fonts, spacing, block positioning, and mobile responsiveness.

CSS code with rules for HTML classes

Without CSS, any website looks like a white sheet with black text and blue links. Heading styles, column grids, animations, shadows, rounded corners: all of that is CSS.

In WordPress, CSS lives in theme files (usually style.css). Every theme must have this file; without it, WordPress won't recognize the theme. Plugins can also load their own CSS files through the wp_enqueue_style() mechanism.

1.intro {
2 color: #325050;
3 background: #fff;
4 font-family: 'Libre Baskerville', serif;
5 font-size: 0.85rem;
6 line-height: 1.6;
7}

The dot before .intro means: "apply these styles to ALL elements with the class intro." That's the cascade: one class, many elements across different pages. Change the rule in one place, and the entire site updates.

For modern WordPress development, you need to know not just basic CSS but also responsive layouts using media queries. Themes without responsiveness don't survive today; Google ranks sites using a mobile-first approach.

JavaScript, page behavior

JavaScript is the only one of the five that WordPress can technically work without. A theme can function fully without a single line of JS. But in practice, no modern site does without it.

JavaScript handles what happens after the page loads: dropdown menus, modal windows, lazy loading of images, form validation before submission, theme switching without reload. Everything that responds to user actions (click, scroll, text input) relies on JS.

1(function($) {
2 var navMenu = '.primary-navigation';
3 var pageContent = '.main-content';
4 var gap = parseInt($('html').css('font-size'), 10) * 2;
5
6 function setPageMin() {
7 var height = $(navMenu).height();
8 $(pageContent).css('min-height', height + gap);
9 }
10
11 $(window).on('load', function() {
12 setPageMin();
13 $(window).on('resize', function() {
14 setTimeout(setPageMin, 120);
15 });
16 });
17})(jQuery);

This jQuery example shows a typical task: calculate the navigation height and set a minimum height for the content area so the page doesn't "jump." The code runs on load and on every window resize.

But JavaScript's biggest impact on WordPress came with Gutenberg, the block editor written in React. The entire post-editing interface, all blocks (paragraph, heading, gallery, columns), is a JavaScript application running inside the WordPress admin.

That's why today a WordPress developer who ignores JavaScript entirely is quite limited. You can build a theme, but you can't write custom Gutenberg blocks without JS.

SQL and MySQL, where data lives

Posts, pages, settings, users, comments, meta fields: all WordPress content is stored in a MySQL (or MariaDB) database. PHP communicates with the database through SQL queries, but developers rarely need to write "raw" SQL.

WordPress provides its own abstraction layer, the wpdb class. Calls like get_posts(), update_post_meta(), and WP_Query already contain ready-made SQL queries inside. This protects against common mistakes and SQL injection, as long as you use built-in methods rather than writing manual queries.

Still, understanding SQL is useful: when a project grows to tens of thousands of posts and queries start slowing down, the ability to read EXPLAIN and find a missing index is invaluable.

How a WordPress theme is structured

A WordPress theme isn't a monolith. It's a set of PHP files, each responsible for a different page type. index.php handles the home page and everything by default. single.php handles individual posts. page.php handles static pages. archive.php handles category archives. WordPress automatically selects the right template based on a hierarchy called Template Hierarchy.

Inside each template: standard PHP functions from the WordPress core. the_title() outputs the title. the_content() outputs the post body. wp_nav_menu() outputs the menu. The full list is available in the WordPress documentation. HTML and PHP are mixed in themes: open <?php, call a function, close ?>, continue with HTML. It's not ideal architecture by modern standards, but it powers 40%+ of websites on the internet.

To create a theme, you need to know PHP, HTML, and CSS at minimum. JavaScript is optional but useful for interactive elements (mobile menu, tabs, accordions).

How a WordPress plugin is structured

A plugin is a PHP file (at least one) with a special comment header at the beginning. In this comment, WordPress reads the name, version, and author: everything you see in the admin on the plugins page.

A plugin interacts with the core through hooks. There are two types:

  • Actions (add_action) execute code at specific moments: when a page loads, when a post is saved, when a plugin is activated.
  • Filters (add_filter) intercept and modify data: change text, add a CSS class, replace a URL.

The simplest plugin is literally a few lines:

1<?php
2/**
3 * Plugin Name: Greeting Plugin
4 * Description: Adds a greeting at the end of every post.
5 * Version: 1.0
6 */
7
8function my_greeting($content) {
9 if (is_single()) {
10 $content .= '<p>Thank you for reading our blog!</p>';
11 }
12 return $content;
13}
14add_filter('the_content', 'my_greeting');

See add_filter? That's exactly how WordPress plugins extend functionality: not by editing the core (which is strictly forbidden) but by intercepting data through hooks. That's why WordPress updates don't break custom code, as long as the developer used the official API instead of modifying core files.

WordPress and Node.js: no replacement coming

Rumors that WordPress is "switching to Node.js" have circulated since 2015, when Calypso appeared. Calypso is a desktop admin interface for WordPress.com, written in Node.js and React. Then came Gutenberg, also in React. JavaScript became more visible, and some concluded PHP was on its last legs.

That's not true. The official WordPress position is unchanged: the core stays on PHP. No one plans to rewrite a 20-year-old codebase in Node.js; it would be pointless and would break backward compatibility with thousands of themes and plugins.

What actually happened: WordPress became a hybrid platform. Backend: PHP and MySQL. Admin front end: JavaScript (React). Public-facing site: HTML, CSS, and some JS. REST API, built into the core since version 4.7, allows JavaScript applications to communicate with WordPress without page reloads. This opened the door to headless solutions, where WordPress works as a headless CMS backend while the front end is built on Next.js or Gatsby.

Bottom line: learning Node.js and React for WordPress work is useful, but not instead of PHP. Learn them alongside PHP.

Where to start learning WordPress

The learning path goes from simple to complex, from what the user sees in the browser to what happens on the server.

Step 1: HTML. Without understanding tags, attributes, and document structure, there's no point moving forward. HTML is the alphabet of the web. Fortunately, the basics can be learned in a week.

Step 2: CSS. Once the page has structure, it needs styling. Learn the box model, positioning, flexbox, grid, and media queries. Without responsive layouts, you can't build a WordPress theme.

Step 3: PHP. Now, the most important part. Learn PHP in the WordPress context: how core functions work, what the WP_Query loop is, how the template hierarchy is structured. Generic "PHP in general" is needed as a foundation, but focus on what you'll actually encounter in themes and plugins.

Step 4: JavaScript. Start simple: jQuery for DOM manipulation and event handling. Then, modern JavaScript (ES6+), followed by React for custom Gutenberg blocks.

Step 5: SQL. Don't write queries manually unless absolutely necessary, but be able to read and understand what's happening under the hood of WP_Query. On large projects, this will save hours of debugging.

The order matters. If you start with JavaScript while ignoring PHP, you'll be able to write Gutenberg blocks but won't be able to build a theme. If you start with PHP without HTML/CSS, you'll have server-side code but nothing to show the user. Follow the path, and within a few months you'll be able to build a complete theme from scratch.

⁉️🤔 Frequently asked questions

Do I need to know all five languages to create a WordPress theme?

To build a simple theme, PHP, HTML, and CSS are enough. JavaScript is needed for interactive elements: mobile menu, slider, lazy loading. SQL isn't essential at the start since ready-made core functions hide database queries. But for complex projects and optimization, you can't do without JS and SQL.

Can I become a WordPress developer knowing only JavaScript?

No. The core, themes, and plugins run on PHP. JavaScript is useful for Gutenberg blocks and front-end interactivity, but without PHP you can't create even the simplest plugin. JavaScript and PHP in WordPress are partners, not competitors.

Is it true that WordPress will completely switch to JavaScript soon?

No. The official position of the WordPress team: the core stays on PHP. JavaScript extends capabilities (Gutenberg, REST API) but doesn't replace PHP on the server side. Concerns arose due to React's growing presence in the admin panel, but that's evolution, not platform replacement.

How long will it take to learn WordPress development from scratch?

With a sequential approach (HTML → CSS → PHP → JS → SQL) and daily practice, expect 4 to 8 months to reach the level where you can confidently build a custom theme and simple plugin. The first two weeks are just HTML and CSS. After that, PHP will take most of your time because everything depends on it.

Do I have to learn jQuery, or can I go straight to React?

jQuery is still used in most WordPress themes and is built into the core; knowing it helps when maintaining legacy projects. But for new development (especially Gutenberg blocks), learn React. Start with modern JavaScript (ES6+), then React: that's the more future-proof path.

Is it worth learning WordPress in 2026

Short answer: yes. WordPress powers 43%+ of all websites on the internet, and this figure has held steady in the 43-44% range for the past several years. Demand for developers who understand more than "click the install theme button" and can write custom functionality in PHP remains consistently high.

The key is the right order. HTML and CSS give you a foundation in a couple of weeks. PHP opens access to the core, hooks, and plugins. JavaScript adds interactivity and growth potential (Gutenberg, headless, React). SQL completes the picture at the database level.

Start with the first step, and in six months you'll see WordPress not as a "website builder" but as a powerful platform you control at every level, from HTML tag to SQL index.