Migrated Web Site To New Server

| 0 comments

I was finally able to migrate my web server to another system and OS (Operating System) to better keep up with updates. I was on Fedora 34 Linux, and I moved the web server over to Rocky Linux 9.x. Fedora only goes 3 versions back for updates and their current version just moved to Fedora 40. Fedora is a bleeding edge Linux OS with a lot of the latest SW which can add further incompatibilities if developers have not had time to update their programs or utilities to use those libraries\software. Fedora actually does a nice job of updating through the versions but that often leads to incompatible versions of PhP or other SW with applications such as WordPress plugins, the MySQL DB etc. 

Since I have my own XCP.ng virtual environment I cloned my webserver and worked on that offline after changing the Ip. Address on the system and in the MySQL database. 

  1.  First, I did the clone then updated to current versions of Fedora this led to a list of issues. 
    • Apache redirects in http.conf and .htacecss were highly customized and did not work 
    • Had to sync with MySQL dB Ip. Address entries as well 
    • The PHP version mismatches were all over the place 
    • Had to disable or remove many plugins 
    • This normally reliable method left me with an unusable website. 
    • I tried this a few times since it had worked for me in the past. 
  2. Next, I created a new VM/system with the same system specs using Rocky Linux 9. 
    • Started with a brand-new version of WordPress 
    • Setup WordPress networking multi-site 
    • Created each site the way I wanted with no data 
    • Installed WordPress plugins fresh if the plugins were maintained and updated. 
    • Found new WordPress plugins or did not install outdate non-maintained plugins. 
    • Installed the WordPress themes I wanted to use and checked they were updated and maintained. 
    • Did a copy of the website files using rsync. 
    • Used Heidi SQL to copy the MySQL DB’s over to this new system 
    • Changed Ip. Addresses in DBs, Apache web server and web configuration files. 
    • This site started working I then decided to increase my website mountpoints size.  
      • Noticed it was under “/” which is root of course and it is not contiguous due to swap. 
      • I have extended “/” several times over the years but this time it just crashed the VM by not booting. 
      • I ended up restoring the VM (Virtual Machines) from a backup I do using the XCP-ng XOA (Xen Orchestra Appliance) source from GitHub. 
      • I did not want to have a large “/” so I decided to split off the mountpoint to a new drive and copy data over which was just as problematic because I had some other system files in the mountpoint. 
  3. Since I decided I wanted more space on the website mountpoint I created a whole new VM with the drives sizes I wanted using Rocky Linux 9.x. Now I would be able to cleanly extend drives and mountpoint space if needed 
    • Initial install for some odd reason the system did not boot 
      • Figured it was how I ordered the mountpoints with the boot partition, swap but may have been how I formatted it. I was resizing and moving mountpoints around prior to the OS install probably chose the wrong formatting option without noticing. 
    • Once I got the system to bootup properly on Rocky Linux 9 I installed updates, and the software packages needed to run a web server. 
    • Started with a brand-new version of WordPress 
      • Setup WordPress networking multi-site 
      • Created each site the way I wanted with no data 
      • Installed WordPress plugins fresh if they were maintained and updated. 
      • Found new WordPress plugins or did not install outdate non-maintained plugins. 
      • Installed the WordPress themes I wanted to use and checked they were updated and maintained. 
      • Imported the posts, comments and other data using WP-Import data from the original site to each multi-site. 
      • Created new menus’ and exported them to the other sites using WPS Menu Exporter plugin. 
  4. Used Heidi SQL to copy the MySQL DB’s over to this new system 
  5. Did a copy of the website files using rsync. 
  6. Used Heidi SQL to copy the MySQL DB’s over to this new system 
  7. Changed Ip. Address in DBs, Apache web server and web configuration files 
  8. Moved over ssl certificates to the new web server
  9. Fine-tuned settings for performance and SEO. 

I still have a few things to accomplish but it’s comforting to get on Rocky Linux 9.x which is a long-term OS that will be around with updates for years instead of the bi-annual update cycle of Fedora that is only has. Just an FYI all places I have MySQL it’s the fork MariaDB.

Leave a Reply

Required fields are marked *.