Link to home
Start Free TrialLog in
Avatar of A A
A A

asked on

upgrade lamp to latest versions on debian 7 without destroying wordpress site

Dear Experts

kindly  I would like to upgrade debain  web server 7 as they have no more updates as it is hosting wordpress site with apache 2.2 and php 5.4 and my sql 5.5 as I would like to update debian to 8 or 10 with Lamp as apache latest and php 5.6 or 7.1 and my sql latest without losing wordpress site so to be up to date with wordpress site.


Avatar of noci
noci

I doubt there are any update for debian 7, afaik support eneded some time ago. (2018)
https://www.debian.org/News/2018/20180601

Imho it would be best to build a new site next to it in a recent Debian and then migrate the content.
SOLUTION
Avatar of Kimputer
Kimputer

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I would like to update debian to 8 or 10 with Lamp as apache latest and php 5.6 or 7.1 and my sql latest without losing wordpress site

likely the best option is to backup and restore to a new debian 10 server
i've done in-place upgrades of ubuntu from 16.04 to 18.04 and 20.04 without issues though you are so far behind on your debian releases it becomes less and less possible to do that

running on apache 2.2 is less comforting as it has been end-of-life since 2017 and may have been hacked
same goes for php 5.4 which had its last update september 2015; 7.3 is out of support the end of this year

your best bet is to do 2 things
  • build a new server with the current supported versions of the LAMP stack
  • keep up with updates of all LAMP components and wordpress version

not doing that puts you at greater risk of having a compromised site (though that risk is currently present)
What you're asking to do is a bit problematic, because you're also running a very old version of WordPress... if you actually have WordPress running on PHP-5.4 which WordPress dropped support for a good bit ago.

First start by mentioning what version of WordPress your running.

And as Seth suggested, before you do anything, backup your WordPress site.

Note: Both PHP-5.6 + PHP-7.1 have reach EOL (End Of Life).

https://wordpress.org/about/requirements states a requirement for PHP-7.4 as the minimum version, is why I'm guessing your running a very old version of WordPress.

So... mention your WordPress version, which will suggest a starting point for the exact sequence for your upgrade sequence.

Also, you'll be upgrading Debian-7 to Debian-10.8 or easier to get working first time... Ubuntu Focal (Latest LTS)...

Jumping many OS versions, much less work if you backup your WordPress site, then do a fresh install of whatever Debian or Ubuntu version you'll be using... as doing an in place upgrade, trying to cover many version will almost certainly fail in many subtle ways.
Tip: If you have budget for this project, might be far more simple to hire someone to do this upgrade for you, as it will likely be an incremental process.

You won't lose your WordPress site + likely your theme and/or plugins will fail + have to be replaced.

I've done this many times.

My normal first step is to run a phpcs compatibility test for targeting PHP-7.4 as the version to check.

Because your code is so old, likely this will be a good step for you to add to your list.

https://www.experts-exchange.com/questions/29150594/Updating-website-page-to-PHP-7.html provides details about setting up + running phpcs (checker) + phpcbf (mass file repairs).

Note: This is a simple process (if done in many steps), just time consuming... to produce a working site after all code is upgraded.

Tip: Once you complete this process, keep all your code updated + you'll avoid this problem again.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial