PHP is a general-purpose scripting language used for web development.
Websites Using PHP
What Is PHP?
PHP is a general-purpose, server-side scripting language created specifically for the web, and it remains one of the most widely deployed programming languages powering websites today. It is the language behind WordPress, the most popular content management system in the world, as well as major frameworks such as Laravel and Symfony, and large platforms including parts of Wikipedia and historically Facebook. If you have ever used a WordPress blog, a Magento store, or a Drupal site, you have used software written in PHP.
PHP originally stood for Personal Home Page and now stands recursively for PHP: Hypertext Preprocessor. It was created by Rasmus Lerdorf in 1994 and has evolved through many major versions; modern PHP (version 8 and later) is a fast, feature-rich language with a just-in-time compiler, strong typing options, and a mature ecosystem. According to W3Techs' ongoing surveys, PHP is used by a very large majority of websites whose server-side language can be identified, which makes it the dominant server-side language on the public web. We describe that figure qualitatively because the exact percentage shifts over time and depends on detection methodology.
It is important to set expectations about what PHP is. PHP is a programming language that runs on the server to generate the HTML, JSON, or other responses your browser receives. It is not a framework by itself, not a database, and not anything that runs in the browser. The PHP code executes on the server; the visitor only ever sees its output.
For technology research, identifying PHP is highly informative. Because PHP underpins WordPress, WooCommerce, Drupal, Magento, Joomla, Laravel, and Symfony, confirming that a site runs PHP narrows down the likely platform and ecosystem considerably. If a site is on PHP, there is a strong chance it is content-driven or e-commerce-oriented, that it relies on a mature plugin or package ecosystem, and that it runs on widely available, cost-effective hosting. For sales prospecting and competitive analysis, that single fact opens the door to a cascade of follow-up questions: which CMS, which framework, which plugins, and which hosting tier. This is why precise language detection, grounded in real server signals rather than guesswork, is so valuable.
How PHP Works
PHP runs on the server in response to incoming requests. When a browser asks for a page, the web server (commonly Nginx or Apache) hands the request to a PHP runtime. The two most common runtimes are PHP-FPM (FastCGI Process Manager), typically paired with Nginx, and mod_php embedded in Apache. The runtime executes the relevant PHP script, which may query a database, call APIs, run business logic, and assemble a response. That response, usually HTML, is sent back to the browser.
Because PHP executes server-side, the visitor never sees the source code, only the generated output. This is why detecting PHP can be subtle: the language leaves fingerprints in headers and cookies rather than in the visible page content. A classic pattern is the session cookie. When a PHP application starts a session, it sets a cookie named PHPSESSID by default, which is a strong indicator that PHP is involved.
PHP applications are frequently built on frameworks and platforms rather than written from scratch. WordPress, Drupal, and Joomla are PHP-based CMS platforms. Laravel and Symfony are full-featured application frameworks. Each of these layers can add its own fingerprints on top of the underlying language, and a single PHP site may expose signals from the language, the framework, and the CMS simultaneously.
A practical complication for detection is that PHP fingerprints are often deliberately hidden. Server administrators frequently disable the X-Powered-By: PHP/<version> header for security, because advertising the exact version helps attackers target known vulnerabilities. Reverse proxies, CDNs, and caching layers such as Cloudflare or Varnish can also strip or replace headers and serve cached HTML without ever invoking PHP for that request. As a result, the absence of a PHP header does not prove PHP is absent; it just means the signal was masked.
Understanding the request flow makes the detection signals easier to interpret. A typical PHP request travels through several stages: the browser hits the web server, the web server passes dynamic requests to PHP-FPM over the FastCGI protocol, PHP executes the application code and talks to a database, and the generated response flows back out. Along that path, several layers can attach or remove headers. The web server sets the Server header, PHP may set X-Powered-By and session cookies, the application or framework may add its own headers, and any front-end proxy can rewrite the lot. When you read a response, you are seeing the cumulative result of all those layers, which is why a methodical look at headers and cookies, rather than a single glance, gives the most accurate reading.
It also helps to know how caching changes the picture. High-traffic PHP sites frequently sit behind a full-page cache so that most visitors receive pre-rendered HTML without PHP running at all for their request. In that scenario, the response may carry cache headers and omit PHP-specific markers, even though PHP generated the cached page originally and still runs for logged-in users, forms, and cache misses. Recognizing this explains why the same site can look like PHP on one request and like a static page on another.
How to Tell if a Website Uses PHP
PHP detection relies on a combination of headers, cookies, and URL patterns. Because StackOptic inspects the raw server response and cookies, it can aggregate these signals; you can check the same ones by hand.
Check response headers with curl. Request the headers:
curl -I https://example.com
Look for:
X-Powered-By: PHP/8.2.0(or another version) — a direct statement that PHP generated the response. This is the clearest signal when present, though it is frequently disabled.Set-Cookie: PHPSESSID=...— the default PHP session cookie. Its presence is a strong indicator of PHP, even when theX-Powered-Byheader is hidden.Server:values that hint at the stack, though this names the web server rather than the language.
Inspect cookies and headers in DevTools. Open developer tools, go to the Network panel, reload, and click the document request. Under Response Headers, watch for X-Powered-By and any Set-Cookie line containing PHPSESSID. The Application or Storage tab also lists cookies, where a PHPSESSID entry confirms PHP sessions.
Examine URL patterns. Some PHP sites expose .php file extensions in their URLs, such as index.php, wp-login.php, or admin.php. The presence of wp-login.php or a /wp-content/ path points specifically to WordPress, which is built on PHP. Clean-URL routing can hide extensions, so their absence is not conclusive.
Use DNS and platform clues. While dig resolves hosting rather than language, the hosting context can hint at PHP. Shared hosts and WordPress-focused providers overwhelmingly serve PHP. Combine this with cookie and header evidence.
Use Wappalyzer. Detection tools such as Wappalyzer flag PHP from the same headers and cookies, and will often name the framework or CMS too. Because proxies can mask signals, verifying with curl and checking for PHPSESSID gives you firmer ground. For more, see how to find out what programming language a website uses, how to read a website's HTTP headers, and how to find out what technology a website uses.
The reason server-side signal analysis is more reliable than browser-only inspection for language detection is that PHP runs entirely on the server and emits no visible client-side code of its own. There is no PHP running in the browser to observe; the only evidence is in the response headers, the cookies, and occasionally the URL structure. A rendered page tells you about the front-end JavaScript, not the back-end language. By reading the raw response, you capture the X-Powered-By header and the PHPSESSID cookie directly from the source. This is precisely the approach StackOptic uses, aggregating header values, cookie names, and URL patterns into a confident determination even when individual signals are sparse.
Finally, weigh the signals appropriately. A live PHPSESSID cookie is strong, positive evidence. An explicit X-Powered-By: PHP header is also strong when present. The absence of both is weak evidence of anything, because hiding those signals is common practice. Treat detection as accumulating positive proof rather than reading too much into missing markers, and corroborate language findings with CMS and framework clues, such as WordPress paths, whenever they appear.
Key Features
- Web-native design. PHP was built for the web and integrates tightly with HTML output and HTTP.
- Huge ecosystem. WordPress, Drupal, Joomla, Laravel, Symfony, and Composer packages cover nearly every need.
- Broad hosting support. Almost every shared and managed host supports PHP out of the box.
- Modern language features. PHP 8+ adds a JIT compiler, union types, enums, attributes, and named arguments.
- Mature tooling. Composer for dependencies, PHPUnit for testing, and robust framework tooling.
- Database connectivity. First-class support for MySQL, PostgreSQL, SQLite, and more via PDO.
- Gentle learning curve. Approachable for beginners while scaling to large applications.
Pros and Cons
Pros
- Powers the largest share of the server-side web, so skills and resources are abundant.
- Inexpensive and easy to host almost anywhere.
- Massive ecosystem of CMS platforms, frameworks, and libraries.
- Modern versions are fast and feature-rich.
- Strong community, documentation, and long history of stability.
Cons
- Legacy codebases and older versions can carry security and quality issues.
- Inconsistencies in the standard library reflect the language's long, organic history.
- Concurrency and long-running processes are less natural than in some newer languages.
- Easy to write insecure code if best practices are ignored, which has affected its reputation.
PHP vs Alternatives
PHP competes with other server-side languages and runtimes. Each has different strengths for web development.
| Language | Typical Frameworks | Strengths | Common Use |
|---|---|---|---|
| PHP | Laravel, Symfony, WordPress | Web-native, huge ecosystem, cheap hosting | CMS, e-commerce, general web |
| Node.js (JavaScript) | Express, Next.js, NestJS | Single language front-to-back, async I/O | APIs, real-time apps, SSR |
| Python | Django, Flask, FastAPI | Readability, data and AI ecosystem | Web apps, data-driven services |
| Ruby | Rails | Developer productivity, conventions | Startups, rapid development |
If you are evaluating a stack built on PHP frameworks, see our profile on Laravel, the most popular modern PHP framework. The right language depends on team skills, ecosystem needs, and the type of application.
Use Cases
- Content management. WordPress, Drupal, and Joomla power blogs, news sites, and corporate sites.
- E-commerce. Platforms like WooCommerce and Magento run online stores on PHP.
- Custom web applications. Laravel and Symfony power dashboards, SaaS backends, and APIs.
- Rapid prototyping. PHP's low setup cost makes it quick to stand up a working site.
- Legacy maintenance. A vast body of existing PHP applications requires ongoing development.
Frequently Asked Questions
How can I tell if a website is built with PHP?
Run curl -I https://thesite.com and look for an X-Powered-By: PHP header or a Set-Cookie line containing PHPSESSID. The PHPSESSID session cookie is especially reliable because it appears even when administrators hide the version header. URLs ending in .php and paths like /wp-content/ also indicate PHP.
Why might PHP be hard to detect on some sites?
Administrators often disable the X-Powered-By header to avoid revealing the version to attackers, and CDNs, caches, or reverse proxies can strip headers or serve cached HTML without invoking PHP for that request. The absence of a PHP header therefore does not prove PHP is absent; the signal may simply be masked.
Is PHP still widely used?
Yes. PHP powers a very large majority of websites whose server-side language can be identified, largely because WordPress alone runs a substantial portion of the web and is written in PHP. Modern PHP versions remain actively developed and widely deployed.
Does seeing WordPress mean the site uses PHP?
Yes. WordPress is written in PHP, so any WordPress site is running PHP on the server. Signals like wp-login.php, /wp-content/ paths, and WordPress-specific headers therefore also confirm PHP, even if no explicit PHP header is present.
What is the difference between PHP and Laravel?
PHP is the underlying programming language. Laravel is a framework written in PHP that provides structure, routing, an ORM, and conventions for building applications more quickly. A Laravel site is always a PHP site, but a PHP site is not necessarily using Laravel; it might use a different framework, a CMS, or plain PHP.
Identify the languages, frameworks, and CMS behind any site with a free StackOptic scan at https://stackoptic.com.