You may have read in AlmaLinux Apache/PHP/MySql WordPress Migration Tutorial how RJM Programming Apache/PHP/MySql hosting will eventually move from a …
- PHP version starting with “5” … to …
- PHP version starting with “8”
If your reaction is …
So what?
… we admire your panache, but if you’re the duck wading through the near shoreline weeds, and the legs aren’t working too well …
Life wasn’t meant to be easy.
We picked the interfacing to the Google Chart Geo Chart inhouse interfacer PHP web application as our opening gambit, figuring it would have extensive issues … and it did not fail to disappoint in this respect …
… 3 hours later …
What can we say? As a precis …
- $_SERVER[‘HTTP_REFERER’] is deprecated
- $_GET[‘alabel’] and/or $_POST[‘alabel’] type “globals”, if undefined, should not appear that way (nor other undefined non-global ones), exposed, unless, maybe, with a ternary PHP isset based intervention, you check for existence dynamically so as to avoid this “exposure”
… and yes, we were well into PHP5 looseness … hence the 3 hours to get to some PHP8 sanguinity!
And what was our great friend here? No need for any PHP debuggers, just good ol’ Google Chrome web browser Web Inspector debugging was fine and PHP errors and warnings would be derivable via PHP statements output and available through the Web Inspector tab called “Console”.
And so, feel free to try the changed geo_chart.php the old way to Geo Chart and now, the new way to Geo Chart.
Previous relevant AlmaLinux Apache/PHP/MySql WordPress Migration Tutorial is shown below.
Yes, we’re migrating again (as we were talking about with Apache/PHP/MySql Web Hosting Website Migration ssh Tutorial), though as you read this blog posting, if hot off the press here on 19/7/2024, we’ll not have transferred the DNS over yet, which we’ll outline the reasons for into the future. But, today, we’re excited to outline some steps after …
- data migration … which our web hoster, Crazy Domains, did a good job regarding … ahead of …
- seeing HTML and Javascript and CSS working fine straight away … and today’s progress migrating the WordPress Blog (involving serverside PHP and MySql) you are reading now …
… in terms of a migration consisting of (just in terms of major players) …
Description | From | To |
---|---|---|
Hosting VPS | CentOS 6.4 x86.64 WHM cPanel 11.38.2 (build 23) | AlmaLinux 9.4.0 cPanel 11.120 |
Operating System type | Linux 2.6.32-220.13.1.el6.x86_64 | Linux 5.14.0-362.18.1.el9_3.x86_64 |
Web Server type | Apache 2.2.29 | Apache 2.4.61 |
Server Language | PHP 5.4.38 | PHP 8.1.19 |
Database type | MySql 5.1.70 | MySql 8.0.38 |
Blog type | WordPress 4.1.1 | WordPress 6.6 |
… that PHP leap very big (and we were near an edge regarding PHP 5.4.38 where a WP-CLI approach as below can still work … some earlier 5’s will not work, we were told along the way), and trepidatious, to our mind, but at least for WordPress, now working, via (just highlights, and we’ll leave out that it is great to have a backup of the MySql WordPress software and database ideally, before starting (because we already had one courtesy of the data migration above)) …
- install WP-CLI … via ssh -p 22 [adminUser]@[newIPaddressForRJMProgrammingIntoTheFuture] … profuse thanks to this great advice …
# cd ~[websiteUser]
# cd public_html/ITblog
# curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
# php wp-cli.phar --info
# chmod +x wp-cli.phar
# mv wp-cli.phar /usr/local/bin/wp - run the plan ideas past Crazy Domains …
- just install the WordPress Codex software in wp-admin and wp-includes … via ssh -p 22 [adminUser]@[newIPaddressForRJMProgrammingIntoTheFuture] …
# su - [websiteUser]
$ cd ~[websiteUser]
$ cd public_html/ITblog
$ wp core download --force --skip-content
- iron out just the one (yee, ha) plugins and/or theme issues that can occur entering a URL such as https://[newIPaddressForRJMProgrammingIntoTheFuture]/ITblog into a web browser address bar … removing …
New Google Plus Badge Widget
… plugin folder and files, because it’s name was apparent in the error message in the video below, and once done WordPress 6.6 starting looking like it’s old self … yee, ha … - amend wp-config.php to add in code statement … thanks to this great advice …
define('RELOCATE',true);
… meaning URLs such as https://[newIPaddressForRJMProgrammingIntoTheFuture]/ITblog just address data and software on [newIPaddressForRJMProgrammingIntoTheFuture] proposed new AlmaLinux9 web server (rather than ducking off to https://www.rjmprogramming.com.au/ITblog/ or https://[oldIPaddressForRJMProgrammingFromTheNearFuturePast]/ITblog/) - on our way to WordPress admin section via https://[newIPaddressForRJMProgrammingIntoTheFuture]/ITblog/wp-admin into the web browser address bar …
WordPress MySql database was updated (to align with PHP 8.1.19 and MySql 8.0.38 and WordPress 6.6 requirements)
- in WordPress admin section General Settings make sure both WordPress Address (URL) and Site Address (URL) get mapped to …
https://[newIPaddressForRJMProgrammingIntoTheFuture]/ITblog
… during our migration phase, at least - practice writing …
Blog posts
… in WordPress Code editor (showing HTML, as we are most familiar with, but you can edit in a visual mode of use, if you like)
Feel free to see some of what we did here in video below …
Previous relevant Apache/PHP/MySql Web Hosting Website Migration ssh Tutorial is shown below.
One of the most amazing aspects to the Crazy Domains performed data migration for the RJM Programming domain on 17/1/2023, thanks, was the way, from our point of view, it was …
Changed | No change |
---|---|
IP address | Any usernames |
Power management | Any passwords |
DNS mappings | ssh access (just with changed IP address slotted in for old one) |
sftp access | |
cPanel access (just with changed IP address slotted in for old one) |
… with so little affecting our day to day interactions with the website.
And so, on this topic, adding to the recent Apache/PHP/MySql Web Hosting Website Migration DNS Tutorial we want to hone in on that Any usernames and Any passwords resisting any need to change. How so? Well, it’s to do with how ssh and sftp and RSA keys and Fingerprints work. Let’s ask experts some questions.
And we liked What Is an SSH Key? Generation, Authentication, Key Pair Info & More …
How does SSH RSA key work?
An SSH key relies upon the use of two related keys, a public key and a private key, that together create a key pair that is used as the secure access credential. The private key is secret, known only to the user, and should be encrypted and stored safely.
That “stored safely” is the key (chortle, chortle) to the cleverness of the system. The key is stored on the same web server disk migrated, and so access to a username’s previous password is maintained that way.
And we liked Check the SSH host fingerprint of a server with the web console …
Secure Shell (SSH) uses a fingerprint generated with the unique server host key so that a client can identify the server. Whenever the host fingerprint changes, SSH issues the following warning: The host fingerprint can’t be verified or it has changed. When you configure the SSH server, the host key generates randomly.
And so, we can see that the fingerprint mechanism can help the user authenticate, and have the key refresh itself, in the new web server IP address environment, as you can see in today’s tutorial picture.
Cute, huh?!
Previous relevant Apache/PHP/MySql Web Hosting Website Migration DNS Tutorial is shown below.
Regarding Apache/PHP/MySql web hosting, and the recent Apache/PHP/MySql Web Hosting Website Migration Tutorial‘s subject matter regarding a Crazy Domains inspired Data Migration here at RJM Programming on 17/1/2023, we wanted to go over a last set of DNS setting …
The Domain Name System (DNS) is a hierarchical and distributed naming system for computers, services, and other resources in the Internet or other Internet Protocol (IP) networks. It associates various information with domain names assigned to each of the associated entities. Most prominently, it translates readily memorized domain names to the numerical IP addresses needed for locating and identifying computer services and devices with the underlying network protocols.[1] The Domain Name System has been an essential component of the functionality of the Internet since 1985.
… steps that represented that final “tying the knot” of repositioning the RJM Programming domain to a new IP address and allowing cPanel and ssh and sftp website access methods not have to change regarding username and password usage, just IP addresses, perhaps totally “behind the scenes”. Think of it like a “renaming the underbelly” exercise, perhaps!
Until these DNS settings are adjusted in “A records” up at the web hoster by the Webmaster or Web Hoster, and there is, typically, about a five minute wait afterwards, the website cannot be reached via your usual …
https://www.rjmprogramming.com.au
… web browser address bar way to navigate to the Landing Page of the RJM Programming domain.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.