Tag: outdated vps

  • Ubuntu LTS versions and their counterpart PHP and MySQL versions.

    Ubuntu LTS versions and their counterpart PHP and MySQL versions.

    Introduction

    The following table lists the main Ubuntu LTS releases from 18.04 to 26.04 and their typical PHP and MySQL versions from the official Ubuntu repositories.

    Ubuntu LTS versionCodenameDefault PHP versionDefault MySQL version
    18.04 LTSBionic BeaverPHP 7.2MySQL 5.7
    20.04 LTSFocal FossaPHP 7.4MySQL 8.0
    22.04 LTSJammy JellyfishPHP 8.1MySQL 8.0
    24.04 LTSNoble NumbatPHP 8.3MySQL 8.0
    26.04 LTSResolute RaccoonPHP 8.5MySQL 8.4

    Ubuntu support

    Ubuntu LTS releases generally receive 5 years of standard security maintenance, with extended security updates available through Ubuntu Pro. Here are the support dates for each major LTS release from 16.04 to 26.04, according to Canonical’s official release lifecycle.

    Ubuntu LTS versionCodenameReleasedStandard support endsExtended security maintenance (Ubuntu Pro) endsLegacy support ends
    16.04 LTSXenial XerusApr 2016Apr 2021May 2026May 2031
    18.04 LTSBionic BeaverApr 2018May 2023May 2028May 2033
    20.04 LTSFocal FossaApr 2020May 2025May 2030May 2035
    22.04 LTSJammy JellyfishApr 2022May 2027May 2032May 2037
    24.04 LTSNoble NumbatApr 2024May 2029May 2034May 2039
    26.04 LTSResolute RaccoonApr 2026May 2031May 2036May 2041

    What if you have outdated versions

    Ubuntu can still receive updates after its standard support period ends, but it depends on the Ubuntu version and the type of update.

    For a server running WordPress, PHP and MySQL, this is important because an outdated Ubuntu release can continue to run normally even after it stops receiving regular security patches.

    What happens after Ubuntu support ends?

    Update typeAfter standard support ends
    Regular security updatesStop under standard support
    Bug fixes and maintenance updatesGenerally stop
    Extended security updatesAvailable for eligible releases through Ubuntu Pro
    Application updates (PHP, MySQL, WordPress)Depend on the application’s own support and repository
    Upgrade to a newer Ubuntu LTSStill possible; recommended for long-term maintenance

    Conclusion

    Assuming you have a digitalocean droplet, then You have 3 choices when your ubuntu version is less than version 24, First upgrade them. There are some risks in this option like incompetible, so best to do it step by step:

    1. backup and live snapshot your server.
    2. clone a server and update clone server noting all the problems and solutions.
    3. update ubuntu version one at a time, DO NOT skip order. That is you NEED to upgrade ubuntu 16 to 20 first, then 20 to 22, 22 to 24 and lastly 24 to 26. you can live snapshot before every update as a fail-safe step.
    4. keep you backup and snapshot for 7 days and check every function of your server like payment gateway, online shop function etc.
    5. This is the recommended way

    Secondly, you can keep your server as it is, and your site will be vulnarable to hacking. being hack would mean your site data and activities will be halted to compromised.

    Thirdly, you can setup a new server and export your wordpress site data and database to new server. you would need to sollow following steps to setup new LAMP with wordpress cluster as new digital one click app always setup cluster wordpress which I’m not included towards.

    Fourly, you can check out Extended Security Maintenance (ESM), which is a service provided by Canonical for Ubuntu that gives you access to ongoing security updates and maintenance for specific older versions of Ubuntu after they have reached their end of life. This is particularly useful for users who need to maintain legacy systems but still require security updates.

    How to Enable ESM in Ubuntu:

    1. Check for ESM Availability: Ensure your version of Ubuntu supports ESM. You can check the status of your Ubuntu version here.
    2. Register Your System (if necessary): You might need to register your system with an Ubuntu Advantage account to access ESM, which is often free for personal use. You can register with:sudo ua attach <your-token>
    3. Enable ESM: Once registered, run the following command to enable ESM:sudo apt-get install ubuntu-advantage-tools sudo ua enable esm-infra
    4. Update Your Package Lists: After enabling ESM, update your package lists to retrieve the available security updates:sudo apt update
    5. Upgrade Packages: To apply the available security updates, you can run:sudo apt upgrade

    Recommendation

    It is advisable to regularly check for available updates and patches, as enabling ESM can help ensure your system remains secure even after its standard support period ends.

  • Upgrading an Outdated Ubuntu VPS: The Step-by-Step Guide

    Upgrading an Outdated Ubuntu VPS: The Step-by-Step Guide

    Learn how to safely upgrade your server OS, PHP, and MySQL database without breaking your website.

    Upgrading an outdated server (Virtual Private Server) can feel intimidating, but if you follow the right sequence, you won’t crash your website or lose your data.

    Think of your VPS like a house:

    • Ubuntu is the foundation and walls.
    • PHP is the plumbing and electricity.
    • MySQL is the fragile filing cabinet storing all your precious data.

    If you try to move the filing cabinet while breaking down walls, everything will shatter. That is why the order of operations is critical.


    The Golden Rule: OS & PHP First, MySQL Second

    Always upgrade your operating system and web scripting environment first, while keeping your database untouched. Once the house is structurally stable on the newest version, you upgrade the database step-by-step.

    [Phase 1: Foundation]               [Phase 2: Database]
    Ubuntu 20.04 (PHP 7.4)             MySQL 5.7
              ↓                                 ↓
    Ubuntu 22.04 (PHP 8.1/8.3)         MySQL 8.0
              ↓                                 ↓
    Ubuntu 26.04 (PHP 8.3)             MySQL 8.4 → 9.3 → 9.7

    Step-by-Step Upgrade Process

    Step 1: Take a Full Server Snapshot (Backup)

    Crucial prerequisite before running any terminal commands

    Before typing a single command, log in to your VPS provider dashboard (DigitalOcean, AWS, Linode, etc.) and create a full Snapshot / Backup. If anything breaks during the upgrade, you can restore your entire server with one click.

    Step 2: Upgrade Ubuntu OS & PHP (20.04 LTS → 22.04 LTS → 26.04 LTS)

    Do not touch or upgrade MySQL during this phase

    Update your current packages first, then upgrade the operating system release by release. Never skip LTS versions.

    1. Update current packages:
      sudo apt update && sudo apt dist-upgrade -y
    2. Upgrade Ubuntu 20.04 LTS to 22.04 LTS:
      sudo do-release-upgrade
    3. Install PHP 8.3:
      sudo add-apt-repository ppa:ondrej/php -y
      sudo apt update
      sudo apt install php8.3 php8.3-cli php8.3-fpm php8.3-mysql -y
    4. Upgrade to the next LTS version (24.04 / 26.04 LTS):
      Repeat sudo do-release-upgrade to move to the next long-term support release while keeping PHP configured at 8.3.

    Step 3: Verify PHP and Web Services

    Ensure your websites can run on PHP 8.3

    Check that PHP is running correctly on version 8.3:

    php -v

    Ensure your web server (Nginx or Apache) points to the new php8.3-fpm socket and that your websites load properly before touching the database.

    Step 4: Upgrade MySQL via the Sequential Version Path

    Path: 5.7 → 8.0 → 8.4 → 9.3 → 9.7

    Major MySQL updates change how data is stored. You cannot jump directly from 5.7 to 9.x; doing so will corrupt your tables. You must step through each major milestone:

    • Step 4A: MySQL 5.7 → 8.0
      Run the MySQL shell upgrade checker to verify syntax compatibility, then upgrade packages to 8.0.
    • Step 4B: MySQL 8.0 → 8.4 LTS
      Upgrade to 8.4 (the Long Term Support release for MySQL 8).
    • Step 4C: MySQL 8.4 → 9.3 Innovation Release
      Transition into the MySQL 9.x series.
    • Step 4D: MySQL 9.3 → 9.7
      Finalize the upgrade to version 9.7.

    After each MySQL step, run the system status check to verify database health:

    sudo systemctl status mysql

    Key Takeaways for Beginners

    1. Never jump OS or Database major versions. Moving incrementally (20.04 → 22.04 → 26.04 for OS; 5.7 → 8.0 → 8.4 for MySQL) ensures automatic data migration scripts run smoothly.
    2. Freeze database changes while upgrading. Do not make major database updates at the same time you are updating OS libraries.
    3. Always test PHP compatibility. PHP 7.4 code often uses functions deprecated in PHP 8.3, so ensure your website scripts (like WordPress plugins or themes) are updated to support PHP 8.3.