Website Without PHP
English (United States)US
  • English (United States)
  • Dutch (Netherlands)
Menu

Attack surface

Also known as: exposure

The attack surface is the total of all places where an attacker could try to get in, such as logins, forms, plugins and the code on your server.

Read the explanation

Security Last updated:

The attack surface is the total of all places where an attacker could try to get in, such as logins, forms, plugins and the code on your server. A smaller attack surface means fewer places where a flaw can hide, which is why reducing it is one of the most effective security steps for a site owner and one of the cheapest.

What is an attack surface?

Open ports, logins, plugins, forms and server code all count as points of entry.

Think of a building. The attack surface is the number of doors, windows and vents someone could try. You cannot make a building with no entrances, but you can stop leaving back doors open that nobody uses.

A website works the same way. Each feature that accepts input or runs code on a request is a possible entry point.

Security people split it into a few parts. The visible part is what anyone can reach from the internet: pages, forms, login screens and public files. The hidden part is what runs behind them: the PHP runtime, the web server, the database and every plugin loaded on each request.

More is not better

Every plugin adds code that runs on your server and that someone must keep updated. A plugin that is switched off but still installed can still hold a vulnerability. A feature you added for a campaign three years ago and forgot is still part of your surface.

What it means for a PHP or WordPress site

Which PHP version does your site report?

We read only what your site already sends in public: the headers and the top of the homepage. No scan, no login.

A typical WordPress site has a large surface by design. It has a login at a known address, a plugin system that loads third-party code and a database that the code queries on each visit. Add old WordPress plugins and an outdated PHP version, and the number of places to watch grows quickly.

Some surface is easy to cut. Remove plugins you do not use, close accounts that are no longer needed and check whether the XML-RPC endpoint is something you need. Other parts are structural, which is where the choice between dynamic and static pages matters.

A concrete example

Compare two sites with the same pages. The first runs on PHP and a database: on every page view, code on the server builds the page. The second is a static website: the pages are made ahead of time and served as files, with no PHP and no database on the server when a page is viewed.

A flaw in the PHP runtime or in a plugin can only matter to the first. That is what we mean when we say a static site has a smaller attack surface. It does not mean it cannot be attacked, since the host, the access to the files and any third-party scripts still count.

How to check and when to act

Start with a list: PHP version, CMS version, plugins, themes, admin accounts and third-party scripts. The free PHP exposure check shows what your site reveals from the outside, which is the part an attacker sees first. Then ask of each item: do I use this, is it maintained and could the site work without it?

If the list is long and the site mostly shows content, the better move may be to move from WordPress to a static site so that most of the surface disappears. If you must keep the dynamic parts, update them on a schedule and drop what you can.

Not sure how this applies to your site?

Ask a person to take a look. We check which PHP version your site runs and whether the fix is in, and tell you the next step.

Ask a person to take a look

Or have PHP updated right away: PHP update from $555 excl. VAT

Frequently asked questions

What is included in the attack surface of a website?

Everything an outsider can reach or that runs on a request: login pages, forms, plugins, themes, the CMS, PHP, the web server, open ports and third-party scripts. The more there is, the more places a flaw can sit.

How do I make the attack surface smaller?

Remove what you do not use, update what you keep, limit logins and admin access, and ask whether each feature needs code that runs on the server.

Does a smaller attack surface make a site unhackable?

No. It lowers the chance that a flaw exists and limits the damage, but nothing is unhackable. The goal is fewer places for things to go wrong.

Is a static site really safer?

Usually it has a smaller attack surface, because no PHP and no database run on the server when a page is viewed. It still needs a safe host, safe access to the files and care with any third-party scripts.

Share this page

Ask your AI to explain

Opens the chat with a question about this page. An AI answer can differ; the sources above are leading.

This question is sent along: Summarise the confirmed facts on https://websitewithoutphp.com/en-us/glossary/attack-surface/ in 5 short points, with the source per point.

  1. Domain
  2. Check
  3. Result
  4. Report

Which PHP version does your site run?

Enter your domain. We read only what your site already sends in public: the headers and the top of the homepage. No scan, no login.

We keep the domain and the result, never your IP address.