Migration site
Option #1
Step-by-step instructions on how to quickly transfer a site. When you need to transfer to the dev version, all content and the database, or make a deployment
Ssh connect to server
Cd /path/to/wp/folder
wp core download --allow-root
Create db in host panel (if you do not use standard localhost)
wp core config --dbname=YOUR_DATABASE_NAME --dbuser=YOUR_DATABASE_USER --dbpass=YOUR_DATABASE_PASSWORD --dbhost=if_differs_from_a_localhost --dbprefix=dbprefix --allow-root
If on the server where you want to copy ssh root@THE_IP_ADDRESS_OF_YOUR_OLD_SERVER "cd /the/path/to/your/old/wordpress/ > /dev/null&&wp --allow-root db export /tmp/exported-wp-sql.sql > /dev/null" If not, just download the database and put it in the root folder of the site
wp --quiet db import /path/to/file/exported-wp-sql.sql
Else error “sed -i 's/utf8mb4_unicode_520_ci/utf8mb4_unicode_ci/g' export.sql”
wp search-replace
http://old-url.com https://new-url.com --all-tables
wp option update siteurl
http://example.com wp option update home
http://example.com rsync -r root@THE_IP_ADDRESS_OF_YOUR_OLD_SERVER:/the/path/to/your/old/wordpress/wp-content /the/path/to/your/new/wordpress/
chown User:Group ./Domain_folder/ -R
AUTO Deploy to server from gitlab master
https://www.youtube.com/watch?v=9Nl8vF6ICIg step 1
https://www.youtube.com/watch?v=5qqlwJgDQEk&t=16s step 2