A WordPress site that went down when the host moved to PHP 8, brought back, cleaned and rebuilt
15
Problems found by the scan, from code PHP 8 cannot run to a rogue administrator and hidden spam links, all fixed
8.0 s to 1.9 s
Largest paint on a phone, median of five Lighthouse runs, with page weight down from 3,752 KB to 375 KB
6 of 6
Old repair requests carried into the rebuilt plugin, so the office lost nothing

The problem
This is a staged rescue, built to show the work end to end. The business is fictional; the broken code, the errors and the measurements are real. Tredwell Carpets had a WordPress site built in 2015 by a local web company. Nobody had touched it since 2017. When the host moved its servers to PHP 8, every page started showing WordPress's "critical error" message.
Two things stopped the site. The 2014 repair-request plugin used old PHP syntax and functions that PHP 8 removed, so it failed before WordPress could start. Switching it off only moved the failure to the theme, which called another removed function. Underneath, a scan found an administrator account nobody recognised, a disguised file in the uploads folder, spam links hidden off-screen in the footer and an old news post, and an .htaccess rule sending phone visitors from Google to another site. The plugin also put form input straight into database queries.
The content had its own problems. The business had been renamed Tredwell & Daughter in 2019, but the site still said Tredwell Carpets, with old opening hours, phone extensions, a mobile number no longer in use and a Find us on Google+ link. The price list lived on a separate Google Sites page last edited in March 2015.

The solution
The site was restored from its backup onto a private PHP 7.4 copy so it could be seen and measured as it was. The same backup was then scanned on PHP 8 with a read-only script that lists code PHP 8 cannot run, suspicious code, unsafe queries, unescaped output, administrator accounts, hidden links and redirects.
The fix is a repeatable script, so every step is written down and can be run again: the rogue account removed, the disguised file deleted, the hidden links and redirect taken out, the security keys changed so every stolen login stopped working, and the passwords reset. The plugin was rebuilt as Aftercare Requests 2.0 and the six requests from the old one were copied into it. A new theme replaced the 2015 one, the Google Sites price list became a Price guide page, and every old address now sends a permanent redirect to its new page.
The rebuilt site was then measured the same way as the old one: same server, same connection, five Lighthouse runs each on the mobile profile. Performance went from 72 to 100, best practices from 71 to 100, SEO from 83 to 100 and accessibility from 97 to 100.

How it is built
Restore and diagnose first
Nothing is changed until there is a backup and a written list of what is wrong. The old site runs privately on PHP 7.4 for before screenshots and measurements, and the scan runs on PHP 8 against the same files and database.
The plugin, rebuilt
Prepared database queries, a security token on every form, a hidden field and a per-visitor limit against spam, cleaned input, escaped output, a status for each request, a CSV export that cannot be turned into spreadsheet formulas, and a one-time copy of the old table.
A theme with nothing extra
A classic PHP theme with no jQuery, no page builder and no block styles on the front end. One self-hosted variable font, responsive WebP images in two sizes, and about 3 KB of JavaScript for the menu and the project filter.
Old links kept
Old page addresses, the news category and the 2017 news post each send a 301 redirect to the matching new page, so links already in Google and in old emails keep working.
Hardening
The dashboard file editor is switched off, XML-RPC is off, comments and pingbacks are closed and the WordPress version is no longer printed in the page source.

Technologies
Inside the working demo
- A free measure form and an aftercare request form, both saved in WordPress and emailed to the shop.
- An aftercare list for the office, with statuses, click-to-call numbers and a CSV download.
- Eight service pages, a price guide with a worked example, a how-it-works page and sixteen answered questions.
- Recent projects that can be filtered by floor type, and five practical journal articles.
- Opening hours that show whether the showroom is open right now, in UK time.
- Local business details for search engines, a meta description on every page and redirects from every old address.
Tredwell & Daughter is a fictional brand built by Praxline to show what a working product in this category looks like. Every person, firm, club, lot and figure in it is sample data, the demo is not indexed by search engines, and nothing on it is a real transaction.
More from the portfolio
Is your WordPress site broken, hacked or stuck on old PHP?
Start with a 25-minute call: what you do, who uses it, and what it needs to handle. You get a written scope and a fixed price before any work starts.

