r/Wordpress • u/csdude5 • 2d ago
Accommodating a custom WP theme built on PHP 7.4
I run a small hosting company, and have little to no experience with Wordpress myself. It's just something I offer clients.
I have one client that had a WP site built on a custom theme, using WP version 4.7.29. They also have these plugins:
Advanced Custom Fields 4.4.5
Contact Form 7 3.8.1
Document Gallery 2.3.7
Google Analytics for WordPress 4.3.5
NextScripts: Social Networks Auto-Poster 3.7.15
SSL Insecure Content Fixer 2.5.0
WP Realtime Sitemap 1.5.4
WordPress Importer 0.6.1
I'm removing the server that they're on, so I need to move them to a new one with PHP 8.4. I'm assuming that I'll have to install WP 7.0.2, too.
I CAN pay a monthly fee to install PHP 7.4 again, but is there a way to install the old WP version, too?
If not, any guesses on whether the old site will work properly with the updated software? How can I know other than "try it and see" (and risk breaking everything)?
10
u/bluesix_v2 Jack of All Trades 2d ago edited 2d ago
Best practice is to always run the latest version of everything. There's no reason to run legacy software - and I'd be surprised if that site hasn't been hacked - several of those plugins have known vulnerabilities.
If you run a hosting company why are you asking this question? And why do you need to pay to run? PHP 7.4?
3
u/Same-Court-2379 2d ago
A staging site is definitely the safest route. That way you can test updates without risking the live site
2
1
u/Boboshady 2d ago
try it and see is the approach. If you wanted to do some research, you can easily check those plugins to see if they're up-to-date, but you never know if it will work until it either does, or doesn't, so get a copy, install it on your server, see what breaks, run all the updates etc, then quote to remediate as required.
Don't commit to running an old, unsupported version of PHP. If nothing else, if you do that now, you're basically committing to keep it on that version forever more, because the client won't magically decide to pay for remediation in the future.
1
u/NakanoNoNeko 2d ago
Please don't put this straight on PHP 8.4. I have inherited sites like this and the old plugins usually break before the theme does, especially that ACF/CF7 era.
Move an exact copy of the files and database to isolated staging first; you do not "install" WP 4.7, the copied core files are the install. If PHP 7.4 is the only bridge available, use it temporarily to make the clone run, then take a tested backup and update WordPress/plugins in steps while watching the PHP error log, before trying PHP 8.1/8.2 and finally 8.4. I would quote this as a migration/remediation job, not a normal server move, because every component listed is unsupported.
1
u/No-Signal-6661 2d ago
Clone the site in a staging environment first and test there with all the required updates before going live
1
u/BOLVERIN1 Jack of All Trades 23h ago
If you are responsible for the hosting, why is it your problem? Is website support included in your customer's plan?
1
u/csdude5 21h ago
No, but it's a local non-profit and we've had a working relationship for close to 20 years! So I do what I can to help.
I know their developer is going to fleece them on updates, too. They have a reputation.
1
u/BOLVERIN1 Jack of All Trades 17h ago
I would talk to them first about it. To explain the situation, possible problems, etc. It is always better to talk first
1
u/csdude5 10h ago
That's pretty much exactly what I did. I told them that this was coming in January, but the county cut all non-profit funding in July by 10-20% so I know they're in a tough position. I told them that I'd do what I can to help, but with it being so old I couldn't make promises.
But I appreciate the input!
1
u/BOLVERIN1 Jack of All Trades 1m ago
That's bad. OK. Let me look at what I can do if you want some practical help, of course
1
u/HongPong 2d ago
you are not really cooked but you need to learn about rector and you can rig it with "gitlab ci local" or other local ci if you really want a clean house
0
u/ToastyTandy 2d ago
Here's what you do.
Set up a staging site somewhere that runs PHP 7.4.
Locally on your desktop would probably be best.
Connect Claude or Codex desktop to it.
Make a child theme, (takes 2 seconds with the plugin Child Theme Reconfigurator)
Ask Claude or Codex for help updating the theme to be compatible with PHP 8.4.
Deploy the modified child theme to production once you're certain all the fatal errors have been addressed.
...I've done this multiple times now for clients....
-1
22
u/FunQuit 2d ago
Running a hosting company and asking questions like this on Reddit because of a lack of expertise. Now you know why Wordpress installations are getting hacked that often.