for migrating Ubuntu22, php8.1, I’ve updated my blog (wordpress) too.
- Simply download the latest WordPress (6.3.1) and place in a server designated area (ie. /var/www/wordpress) and chown www-data:www-data -R /var/www/wordpress
 - in the mysql database, create a database named ‘wordpress‘
 - adjust php-fpm and nginx max_upload_file_size, if you want to upload .sql file using phpmyadmin. then create a database named ‘wordpress-yourdata‘
 - import the SQL file, so all the previous data is migrated.
 - go to ‘wordpress’ folder, edit ‘wp-config.php‘
 - create nginx conf file for the blog (ie. blog.koodesignstudio.com.conf)
 - restart nginx (dont’ forget “sudo nginx -t“
 - certbot to the blog.koodesignstudio.com
 - access with a browser
 - initial configuration for the new wordpress
 - start from a brand new plain wordpress,
 - update ‘wp-config.php‘ database to ‘wordpress-yourdata‘, now all the data is coming from the previous database
 - copy images from the previous wordpress ./wordpress/wp-content/uploads
 - install the theme and plug-ins as same as the previous
 - done!
 
!IMPORTANT even to migrate from another server, frist create a default ‘wordpress’ dabase, then change ‘wp-config.php’

