Discover Centmin Mod today
Register Now

Migration and setup

Discussion in 'Blogs & CMS usage' started by lostincable, Mar 18, 2022.

  1. lostincable

    lostincable New Member

    24
    2
    3
    Feb 17, 2018
    Ratings:
    +3
    Local Time:
    6:26 AM
    Hi everyone

    Using centminmod option 22 to install a wordpress vhost i have two questions -

    1- What is everyone using for cache enabler? I understand from looking at past benchmarks they both seem to be very similiar in specs but keen to understand what the majority is using.

    2 - What is the best way to migrate from my old host to a new host without loosing alot of what option 22 does? I can use duplicator plugin but it will wipe the base wordpress install. I did look at the differences post between a normal install of wordpress and option 22 and there seems to be quite a list of what you could loose if using duplicator. Also redis / cache enable you may loose some stuff there as well.


    Thanks!
     
  2. eva2000

    eva2000 Administrator Staff Member

    55,155
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    6:26 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    I generally use Cache Enabler cache option. Though it's a bit dated so looking at alternatives to add to centmin.sh menu option 22 selections eventually.

    There's a detailed server migration guide for Centmin Mod to Centmin Mod which outlines basic tools used which once learnt would be applicable to any server migration even non-Centmin Mod (just paths for source/destination would differ) https://community.centminmod.com/threads/centmin-mod-site-data-migration-guide.10382/ and general config files outline Centmin Mod Configuration Files - CentminMod.com LEMP Nginx web stack for CentOS

    But yes, I haven't really properly outlined what needs migrating for centmin.sh menu option 22 installs. I will see if I can quickly come up with a list of files/directories needed. Watch this space :)

    You would of gotten a overview of what's installed and where when you run centmin.sh menu option 22 as automatic log file is created at /root/centminlogs named ending in wordpress_addvhost.log

    You can list your logs in ascending date order via command
    Code (Text):
    ls -lahrt /root/centminlogs/ | grep wordpress_addvhost.log

    example output
    Code (Text):
    ls -lahrt /root/centminlogs/ | grep wordpress_addvhost.log
    -rw-r--r--   1 root root  21K Feb  3  2020 centminmod_123.09beta01.b421_030220-222801_wordpress_addvhost.log
    -rw-r--r--   1 root root  26K Apr 15  2020 centminmod_123.09beta01.b490_150420-211636_wordpress_addvhost.log
    -rw-r--r--   1 root root  30K Aug 29  2020 centminmod_123.09beta01.b570_290820-150955_wordpress_addvhost.log
    -rw-r--r--   1 root root 4.5K Feb 27  2021 centminmod_123.09beta01.b655_270221-170914_wordpress_addvhost.log
    -rw-r--r--   1 root root 4.5K Feb 27  2021 centminmod_123.09beta01.b655_270221-170841_wordpress_addvhost.log
    -rw-r--r--   1 root root  33K Feb 27  2021 centminmod_123.09beta01.b655_270221-172205_wordpress_addvhost.log
    

    Example contents excerpt from /root/centminlogs/2021 centminmod_123.09beta01.b655_270221-172205_wordpress_addvhost.log
    Code (Text):
    vhost for yourdomain.com created successfully
    
    domain: http://yourdomain.com
    vhost conf file for yourdomain.com created: /usr/local/nginx/conf/conf.d/yourdomain.com.conf
    
    vhost ssl for yourdomain.com created successfully
    
    domain: https://yourdomain.com
    vhost ssl conf file for yourdomain.com created: /usr/local/nginx/conf/conf.d/yourdomain.com.ssl.conf
    /usr/local/nginx/conf/ssl_include.conf created
    Self-signed SSL Certificate: /usr/local/nginx/conf/ssl/yourdomain.com/yourdomain.com.crt
    SSL Private Key: /usr/local/nginx/conf/ssl/yourdomain.com/yourdomain.com.key
    SSL CSR File: /usr/local/nginx/conf/ssl/yourdomain.com/yourdomain.com.csr
    Backup SSL Private Key: /usr/local/nginx/conf/ssl/yourdomain.com/yourdomain.com-backup.key
    Backup SSL CSR File: /usr/local/nginx/conf/ssl/yourdomain.com/yourdomain.com-backup.csr
    letsdebug API check log: /root/centminlogs/letsdebug-yourdomain.com-270221-172205.log
    
    upload files to /home/nginx/domains/yourdomain.com/public
    vhost log files directory is /home/nginx/domains/yourdomain.com/log
    
    ------------------------------------------------------------
    SSH commands to uninstall created Wordpress install and Nginx vhost:
      /root/tools/wp_uninstall_yourdomain.com.sh
    ------------------------------------------------------------
    
    ------------------------------------------------------------
    Wordpress Auto Updater created at:
      /root/tools/wp_updater_yourdomain.com.sh
    cronjob set for every 8 hours update (3x times per day)
    ------------------------------------------------------------
    

    But right now not all created directory/files are listed in that log, probably will update it to list them too. Though the /root/tools/wp_uninstall_yourdomain.com.sh generated script has more of them
    Code (Text):
    rm -rf /usr/local/nginx/conf/conf.d/yourdomain.com.conf
    rm -rf /usr/local/nginx/conf/conf.d/yourdomain.com.ssl.conf
    rm -rf /home/nginx/domains/yourdomain.com
    rm -rf /usr/local/nginx/conf/wpincludes/yourdomain.com/wpsecure_yourdomain.com.conf
    rm -rf /usr/local/nginx/conf/wpincludes/yourdomain.com/wpsupercache_yourdomain.com.conf
    rm -rf /root/tools/wp_updater_yourdomain.com.sh
    rm -rf /usr/local/nginx/conf/ssl/yourdomain.com/yourdomain.com.crt
    rm -rf /usr/local/nginx/conf/ssl/yourdomain.com/yourdomain.com.key
    rm -rf /usr/local/nginx/conf/ssl/yourdomain.com/yourdomain.com.csr
    rm -rf /usr/local/nginx/conf/ssl/yourdomain.com
    rm -rf /usr/local/nginx/conf/wpincludes/yourdomain.com/rediscache_yourdomain.com.conf
    rm -rf /usr/local/nginx/conf/wpincludes/yourdomain.com/wpcacheenabler_yourdomain.com.conf
    rm -rf /root/.acme.sh/yourdomain.com
    

    Which would narrow down the directories and files to backup/restore being
    Code (Text):
    /usr/local/nginx/conf/conf.d/yourdomain.com.conf
    /usr/local/nginx/conf/conf.d/yourdomain.com.ssl.conf
    /home/nginx/domains/yourdomain.com
    /usr/local/nginx/conf/wpincludes/yourdomain.com
    /root/tools/wp_updater_yourdomain.com.sh
    /usr/local/nginx/conf/ssl/yourdomain.com
    /root/.acme.sh/yourdomain.com
    
     
    Last edited: Mar 18, 2022
  3. eva2000

    eva2000 Administrator Staff Member

    55,155
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    6:26 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+