Welcome to Centmin Mod Community
Register Now

Wordpress Migrating Wordpress on Apache to Nginx? Possilbe?

Discussion in 'Blogs & CMS usage' started by rc112, Feb 23, 2018.

  1. rc112

    rc112 Member

    124
    14
    18
    Sep 22, 2017
    Ratings:
    +15
    Local Time:
    9:15 AM
    Hi @eva2000
    Is it possible to migrate from Wordpress on Apache to Nginx? My Apache site is on GCP and I am moving it to Digital Ocean or GCP. Can I follow the general guidelines on the forum. The steps will be like:
    1) Back up all the files and db on original sever
    2) Create a WP site on Digital Ocean with CMM option 22 without SSL because domain name it is not yet pointed to.
    3) Using Migration plugin or simply copy and paste the folders and files( different folder structure between Apache and Nginx?) and export and import databases?
    4) Modify wp files to point to the new database?
    5) Generate a new SSL using option 22 again?

    Please Kindly advices! Thanks so much.
     
  2. eva2000

    eva2000 Administrator Staff Member

    36,870
    8,070
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,429
    Local Time:
    11:15 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Whatever you do, do it on test server and keep live wordpress apache site untouched for testing.

    yes

    yes, make sure if old wordpress apache is installed web root you do the same on centmin.sh menu option 22 or if subdirectory do same. But afterwards you'll need to edit wp-config.php and change database name, user, password from centmin.sh menu option 22 setup one to your old wordpress apache details

    then using addons/mysqladmin_shell.sh re-create mysql database name, user and password for old wordpress apache site and then import your mysqldump sql backed up old wordpress apache database into centmin mod user re-created mysql database name you

    then restore files from wordpress apache install into webroot / at /home/nginx/domains/domain.com/public or subdirectory /home/nginx/domains/domain.com/public/oldwpinstalldirectory corresponding to old apache location

    make sure to change user/group permissions
    Code (Text):
    chown -R nginx:nginx /home/nginx/domains/domain.com/public
    


    no for existing nginx vhosts user guide linked to from https://centminmod.com/acmetool at Migrating Existing Nginx Vhost From HTTP to HTTP/2 based HTTPS With Letsencrypt SSL Certificates

     
  3. rc112

    rc112 Member

    124
    14
    18
    Sep 22, 2017
    Ratings:
    +15
    Local Time:
    9:15 AM
    If I install a fresh wordpress with option 22. there is already a database connected to the app already, isn't it?

    If I have wp rocket cache plugin installed on my old wp, should I uninstalled it first since it modify some files regarding cache configuration? Thanks so much for such detailed reply.
     
  4. eva2000

    eva2000 Administrator Staff Member

    36,870
    8,070
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,429
    Local Time:
    11:15 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    yeah so you ignore that one and re-create a new one

    yeah uninstall or disable plugin first
     
  5. rc112

    rc112 Member

    124
    14
    18
    Sep 22, 2017
    Ratings:
    +15
    Local Time:
    9:15 AM
    May I know why can I use the database created by option 22? It seems more sense to me. Thanks.
     
  6. eva2000

    eva2000 Administrator Staff Member

    36,870
    8,070
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,429
    Local Time:
    11:15 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    that database is already populated with data that differs from your backed up and intended to restore database
     
    • Agree Agree x 1
  7. rc112

    rc112 Member

    124
    14
    18
    Sep 22, 2017
    Ratings:
    +15
    Local Time:
    9:15 AM
    Thank you @eva2000 I will give it a try. Thanks again.
     
..