Is WordPress Still Written in PHP? What Developers Need to Know

by Orion Fairbanks

Is WordPress Still Written in PHP? What Developers Need to Know

WordPress—the platform running over 40% of the web—still relies heavily on PHP. Yep, it’s not just nostalgia or habit. If you crack open the files inside any WordPress install (even the latest one), you’ll see hundreds of .php files at the core. This isn’t because developers forgot to move on to the latest shiny language; there are solid, practical reasons behind it.

Most plugins and themes you find are written in PHP. Even if you’re grabbing a fancy new block-based theme, it’s PHP under the hood handling things like routing, database access, and all your custom logic. If you’re running a WordPress site, your server still needs PHP installed—there’s no getting around it. Trying to swap it for something else would be like ripping the engine out of a car and expecting it to run on bicycle pedals.

PHP isn’t just some relic from the early 2000s. The language itself has gotten way faster and more reliable with each major release, and WordPress has kept up too. In fact, sites running on updated PHP versions see real speed and security gains. Developers who ignore these updates usually hit a wall with performance or get stuck fixing way more bugs than they bargained for.

WordPress and PHP: The Relationship Explained

When people ask, "Is WordPress still written in PHP?" the answer is a straightforward yes. The entire structure of WordPress—core files, most plugins, and themes—relies on PHP to function. PHP is the language that takes your requests (like clicking a link or hitting save on a post) and turns them into actions the server can understand. It’s how content is pulled from the database and shown in your browser.

WordPress has used PHP since its first release back in 2003, and there’s never been a version of WordPress that didn’t use it as its main language. The WordPress PHP link is what lets the software stay flexible: you can customize every part of your site, drop in thousands of free or paid plugins, and make themes do exactly what you want. It’s all about using the same language across the whole system.

Another key reason WordPress stays with PHP is hosting. Nearly every web host offers PHP support out of the box, and many are optimized for it. If you pick almost any cheap shared hosting package or a managed WordPress hosting plan, PHP is always there—it just works without extra setup.

Here’s a quick lay of the land inside the WordPress stack:

  • When you load a site, your browser’s request is handled by PHP scripts.
  • PHP talks to the MySQL or MariaDB database to grab your content, settings, and user data.
  • PHP processes this data and spits out the final HTML to display your site.

JavaScript is getting more popular in WordPress, especially for the new block editor and interactive stuff. But for the essential tasks, like talking to the database or setting up the whole site structure, PHP is still doing all the heavy lifting.

How PHP Shapes WordPress Development

PHP isn’t just lurking in the background—it’s the backbone of every major part of WordPress. When you log in, create a post, or install a plugin, PHP is making it all happen. Most of the WordPress PHP code handles stuff like routing requests, connecting to the database, and rendering templates. That’s why, if you view WordPress core files, pretty much everything from wp-config.php to functions.php is written in PHP.

Want to build a custom theme? That means PHP. Making a plugin to add a cool feature? You’re coding in PHP again. Even the WordPress REST API uses PHP under the hood to process incoming data and spit out the right info in JSON.

If you need proof of how PHP shapes WordPress, check out these numbers based on the current release (WordPress 6.5):

Component# of PHP FilesLines of PHP Code
Core~1,500Over 430,000
Themes (default)50+7,000+
Plugins (built-in)130+18,000+

So, just about everything you see and don’t see in WordPress ties back to PHP scripting. If a custom feature pops up in the admin dashboard, there’s almost always a custom PHP function behind it.

Need to get started customizing? Here are the most common ways PHP gets used in modern WordPress development:

  • Action and filter hooks: Add or modify site features without touching core files.
  • Template tags: Easily fetch dynamic content like post titles or author names.
  • Custom post types and fields: Make the site handle more than just posts and pages.
  • Shortcodes: Drop reusable content blocks anywhere on the site with a quick bracketed snippet.

Basically, if you’re working on a WordPress project, understanding and using PHP is non-negotiable. It’s how you bring any unique idea to life on your site.

Why WordPress Still Leans on PHP

Why WordPress Still Leans on PHP

So, why does WordPress keep holding on to PHP? It’s not just for old times’ sake. The biggest reason is compatibility. WordPress powers a huge chunk of the web, and those sites run on every type of hosting you can imagine. PHP is pretty much everywhere, so keeping WordPress in PHP means it works out of the box on nearly any server. No headaches, no weird requirements, just upload and go.

Another reason: the plugin and theme ecosystem. There are over 59,000 free plugins in the WordPress repository, and nearly all of them are built with PHP. Switching to another language would break almost all of them overnight. That’s not something site owners or developers are willing to risk.

Let’s talk about development speed and accessibility. Learning PHP isn’t rocket science. Anyone who wants to tweak, customize, or build a theme or plugin can find loads of up-to-date tutorials and advice. Wordpress’s famous “5-minute install” owes everything to PHP’s simplicity and server accessibility.

  • WordPress PHP keeps development fast and affordable—there’s always someone around who knows PHP and can lend a hand.
  • Patching security holes and releasing updates is way simpler, since the entire foundation is still PHP.
  • Hosts love WordPress because they don’t have to support extra server stacks—PHP is part of their basic package.

Take a look at just how universal PHP support is across the biggest web hosts as of 2025:

Hosting ProviderPHP Supported
BluehostYes
SiteGroundYes
GoDaddyYes
WP EngineYes
DreamHostYes

Bottom line: WordPress’s choice to stick with PHP isn’t about being stuck in the past. It’s about keeping things simple, stable, and flexible for everyone from first-time bloggers to the world’s biggest brands.

Evolving With Modern PHP Versions

People used to complain about PHP being slow and buggy, but that’s changed. Modern PHP—think PHP 7.4, 8.0, 8.1, and above—has made a world of difference. Speed, security, and how much memory scripts eat up have all improved. WordPress doesn’t just passively sit on these updates. It actually encourages site owners to run their sites on the newest PHP versions because the difference shows—especially in site load time and stability.

The numbers are pretty clear. When WordPress moved from PHP 5.6 to PHP 7.x, performance nearly doubled. Here’s a simple table to make it obvious:

PHP VersionRequests per SecondAverage Response Time (ms)
5.695420
7.4190210
8.1220160

It’s not just about speed. Old PHP versions stop getting security fixes, so sticking with them is risky. If your web host lets you stay on outdated PHP, you’re basically daring hackers to run wild.

Upgrading isn’t a huge ordeal for most sites—WordPress core and most popular plugins/themes stay compatible with newer PHP versions. But it’s smart to check compatibility first with a staging site. If you’re running custom code, be ready to tweak a few things. Breaking changes do happen, but the benefits swamp the hassle.

  • Always update to the highest supported PHP version for your host and WordPress version.
  • Test your site on a copy before switching the live version.
  • Keep plugins and themes updated to avoid compatibility headaches.

If you work with WordPress PHP, staying up to date isn’t just smart—it’s essential if you want fast sites that don’t get hacked. The tools are there, and the rewards are real.

Practical Tips for WordPress Developers

Practical Tips for WordPress Developers

If you’re working with WordPress in 2025, there’s no avoiding PHP—so you might as well get good at it and keep things up to date. Here’s what you absolutely want to keep in mind before your next site launch or plugin update.

  • WordPress PHP version matters. WordPress officially recommends PHP 8.1 or higher for best results. Sites running outdated versions face more bugs and security holes—and hosting companies are phasing out PHP 7 entirely. Whenever you can, use the latest supported PHP version to squeeze out better speed and fewer headaches.
  • Don’t forget about backward compatibility. WordPress core supports PHP versions as far back as 7.0 for huge chunks of the web that haven’t upgraded. But most modern plugins and features now target PHP 8.x, so check your plugin's requirements before building or updating.
  • Security isn’t optional. Rely on built-in WordPress functions like wp_nonce_field() for forms or esc_html() to sanitize output. Skipping these steps is asking for trouble when hackers come knocking.
  • Debugging is your friend. Use WP_DEBUG and WP_DEBUG_LOG in your wp-config.php file to catch errors and warnings. This saves hours when tracking down why a page is breaking after an update.
  • Get comfortable with Composer for dependency management. Many big plugins now use Composer for pulling in libraries (like Stripe payment SDKs). It saves time and keeps your code organized.

Here’s how upgrading PHP impacts real-world WordPress performance, according to recent test results:

PHP VersionAverage WordPress Load Time (ms)Requests Per Second
7.465070
8.054085
8.148095
8.2460100

If you want to build WordPress sites that run smoothly in 2025, don’t ignore these numbers. Keeping a sharp eye on your PHP version, writing secure code, and debugging with modern tools isn’t just best practice—it’s survival at this point. And if you ever feel stuck, remember: the WordPress docs and community forums are usually just a quick search away, packed with answers on nearly every problem you’ll hit.

Orion Fairbanks

Orion Fairbanks

Author

I am a seasoned IT professional specializing in web development, offering years of experience in creating robust and user-friendly digital experiences. My passion lies in mentoring emerging developers and contributing to the tech community through insightful articles. Writing about the latest trends in web development and exploring innovative solutions to common coding challenges keeps me energized and informed in an ever-evolving field.

Write a comment