October 22, 2026
6
 min read

What a PHP2Shell Hack Looks Like: 8 Warning Signs

Reza Askari, Partner at Brandcamp Digital
Reza Askari

PHP2Shell is a pair of critical flaws in PHP, the programming language behind WordPress and most of the web. Fixes came out on October 21, 2026. On a server that hasn't been updated, an attacker can run their own code on your website without logging in.

Most coverage explains the bug. This post shows what it looks like from your side when someone uses it, so you can spot it early. If you want to know whether your site is exposed in the first place, check if your website is at risk from PHP2Shell.

Short answer: A website hacked through PHP2Shell can show a red "Dangerous site" warning in browsers, a "This site may be hacked" label in Google, spam pages under your domain, redirects to scam sites, a replaced homepage, stolen card details at checkout, admin accounts you didn't create, a suspended hosting account, and ads that stop running. Several of these show to customers while your own view of the site looks normal.

The images in this post are illustrations we made to show what each problem looks like. They don't show a real business.

‍

8 signs your website was hacked

1. Visitors see a "Dangerous site" warning

Illustration of a red browser warning reading Dangerous site, shown to visitors instead of a business website

Once Google detects malware or phishing on a site, Chrome, Safari and Firefox show a full-screen red warning before the page loads. Most people tap "Back to safety" and never come back. Owners usually find out from a customer, or from a security email from Google Search Console.

How to check: Enter your domain in Google's Safe Browsing site status tool, and look for a Security issues alert in Search Console.

‍

2. Google labels your site "This site may be hacked"

Illustration of Google search results showing a This site may be hacked label under a business listing, plus Japanese spam pages and replica watch pages on the same domain

Attackers often use a hacked site to publish thousands of spam pages selling fake designer goods or pharmacy products, frequently in Japanese. They borrow your domain's reputation to get those pages ranked. Google may then show "This site may be hacked" under your listing, and your real pages can slip in the results.

How to check: Search site:yourdomain.com in Google and scroll through the results. Pages you didn't write, especially in another language, are a red flag.

‍

3. Visitors get sent to scam pages

Illustration of two phones: a visitor taps a business listing in search results and lands on a fake Congratulations prize page asking for card details

Code planted on your site can send some visitors to fake prize pages, fake tech support or malware downloads. It's often set up to target only mobile visitors arriving from Google, and to skip logged-in admins. So when you check your own site, everything looks fine.

How to check: On your phone, switch off Wi-Fi, open a private tab, search for your business and tap your listing. Try it a few times.

‍

4. Your homepage is replaced

Illustration of a defaced homepage: a black page with the word HACKED in green text where the business website should be

Some attackers want to show off, so they swap your homepage for their own message. It's obvious, which means it usually gets caught fast, but every hour it's up costs you calls and bookings.

How to check: Look past the homepage. Defacements sometimes hit a single page you rarely visit, like a contact or landing page.

‍

5. Card details are stolen at checkout

Illustration of a normal-looking checkout page next to a hidden script that copies card numbers and sends them to an attacker's server

On WooCommerce and other PHP stores, an attacker can add a few lines of code to the checkout page that copy each customer's card details as they type them. Orders still go through, so nothing looks wrong. Businesses usually find out weeks later, when customers report fraud or the payment processor gets in touch.

How to check: Have a developer review the scripts that load on your checkout page and compare your site files with a clean copy. If your PHP site takes payments, treat this one as urgent.

‍

6. An admin account you didn't create

Illustration of a WordPress Users screen with an unfamiliar administrator account, wp_support_42, added at 3:14 am

A common first move is to add a hidden administrator account, so the attacker can get back in even after PHP is patched. That's why patching alone isn't enough if your site was already hit.

How to check: In WordPress, go to Users and filter by Administrator. Note the details of anything you don't recognize, remove it, then change every admin password.

‍

7. Your host suspends your account

Illustration of a hosting provider email saying the account is suspended because malware was found, next to a website showing Account Suspended

Hacked servers get used to attack other sites and send spam. When a host notices, it may suspend the whole account to protect its network. On many shared hosting plans, that takes your business email down with the website.

How to check: Look for emails from your host's abuse or security team, including in your spam folder.

‍

8. Your ads stop running

Illustration of an ads dashboard where every ad is disapproved for Compromised site and clicks and leads have dropped to zero

Google Ads disapproves ads that send people to a compromised site, and Meta can block links to domains flagged as unsafe. Campaigns can drop to zero in a day, and they stay off until the site is cleaned and reviewed.

How to check: In Google Ads, look for "Compromised site" or "Malicious software" disapprovals, or a sudden drop in clicks with no change on your end.

‍

What to do if you see any of these

  1. Back up the site as it is now. Before you change anything, save a copy. It helps work out how the attacker got in.
  2. Take the site offline if it's redirecting visitors or taking payments. Security agencies advise keeping unpatched systems offline until they're fixed.
  3. Update PHP to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or ask your host to. PHP 8.1 and older won't get a fix, so plan an upgrade.
  4. Clean the site. Restore a backup from before the hack, or have a developer remove the planted code and unknown admin accounts.
  5. Change passwords and keys for WordPress admins, hosting, the database, FTP, and any payment or API keys stored on the server.
  6. Ask Google to review the site in Search Console once it's clean, and appeal any ad disapprovals.
  7. If you take payments, contact your payment processor. You may also need to report the breach and tell affected customers.

‍

Not sure if your website is exposed?

If your site runs on Webflow, Shopify, Squarespace or Wix, PHP2Shell doesn't affect it. If it runs on WordPress or another PHP platform, get a free PHP2Shell website check. Answer a few quick questions and we'll email you an audit with what to fix.

PHP2Shell hack questions

How do I know if my website was hacked through PHP2Shell?

Look for the signs in this post: browser warnings, a "This site may be hacked" label in Google, spam pages under your domain, redirects to other sites, admin users you didn't create, or a warning from your host. Some signs only show to visitors, so also check from a phone on mobile data.

Can a hacked website hurt my Google rankings?

Yes. Google can label the site as hacked and show browser warnings, and spam pages can crowd out your real ones. Rankings usually recover once the site is cleaned and Google reviews it, but that can take weeks.

Does updating WordPress fix a PHP2Shell hack?

No. PHP2Shell is a flaw in PHP, so PHP on the server needs the update. If an attacker already got in, updating also won't remove what they left behind, like hidden admin accounts or planted code. The site needs to be cleaned as well.

Is my Webflow or Shopify site affected by PHP2Shell?

No. Webflow, Shopify, Squarespace and Wix don't run PHP for your site, so PHP2Shell doesn't affect them.

Resources to guide you

Our team has a passion for sharing knowledge. Read our latest insights below.

Get digital marketing insights to your inbox.