skip to Main Content

seeking advice to deploy my wordprees site on a new GCP vm.

the previous vm is down it was wordpress certified by bitnami click to deploy on Debian.

the vm got suspend and after reinstated its not accessible throw ssh.

so i create new ubuntu vm and mount the debian disk to take the files to the new vm.

i copied the wordpress folders to the new vm and i used new database.

i got the plugins and theme but no pages or photos or products or setting.

now i need to transfer the database to mysql in ubuntu.

the path of the files is
mounted/opt/bitnami/mysql/data/bitnami_wordpress

my new vm mysql path is
/var/lib/mysql

2

Answers


  1. Chosen as BEST ANSWER

    wordpress migration to new VM instance GCP mysql not running after migration

    My site got unauthorized redirect, I have edited the theme php files then the GCP ssh dead ?!

    I have followed the same again as my question

    I create new vm wordpress certified by bitnami

    Stop the 2 VM instance

    gcloud config set project my-pro
    gcloud beta compute instances detach-disk old --disk old --zone namezone
    gcloud beta compute instances attach-disk new --disk old --zone namezone
    

    Start the new VM instance

    sudo mkdir /old-disk
    sudo mount /dev/sdb1 /old-disk/
    sudo /opt/bitnami/ctlscript.sh stop
    sudo cp -r /deb-disk/opt/bitnami /opt
    sudo umount /dev/sdb1
    

    Stop the 2 VM instance

    gcloud beta compute instances detach-disk new --disk old --zone namezone
    gcloud beta compute instances attach-disk old --disk old --zone namezone --boot
    

    Kindly advice as the VM is down and i need to restore it asap

    #########################

    Thanks echo resolved after executing

    sudo tail -n40 /opt/bitnami/mysql/data/mysqld.log
    

    and i got to know the permission is not enough

    [ERROR] [MY-010958] [Server] Could not open log file.
    [ERROR] [MY-010041] [Server] Can't init tc log
    [ERROR] [MY-010119] [Server] Aborting
    

    so i execute

    sudo chmod 777 /opt/bitnami/mysql/data
    sudo chown mysql:root -R /opt/bitnami/mysql/data
    sudo find /opt/bitnami/mysql/data -type d -exec chmod 750 {} ;
    sudo find /opt/bitnami/mysql/data -type f -exec chmod 640 {} ;
    sudo /opt/bitnami/ctlscript.sh start
    

  2. Bitnami Engineer here,

    Every time a user wants to migrate the WordPress content to a new instance, we suggest them use the All in One WordPress Migration plugin. You will simply need to export the data in your current instance

    enter image description here

    and export it later in the new instance you launch

    enter image description here

    If you had any other customization in the instance (SSL certificates, redirection, …), you will need to apply those changes in the new instance as well.

    You can learn more about that here.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search