Learn about Centmin Mod LEMP Stack today
Register Now

Wordpress Best way to move existing WP site (shared hosting) to centmin mod ?

Discussion in 'Blogs & CMS usage' started by harryneopotter, Oct 3, 2015.

  1. harryneopotter

    harryneopotter Member

    70
    3
    8
    Aug 16, 2015
    Ratings:
    +8
    Local Time:
    10:29 PM
    Nginx 1.9.3
    MariaDB 10.0
    How do you guys go about it ? What is the best way ? A clean manual install (without using centmin menu wp setup ) and then importing database/files ? Or any other way ? Plugins like backupbuddy ? Will be eternally in debt if someone can guide me to the right direction.

     
  2. rdan

    rdan Well-Known Member

    5,449
    1,410
    113
    May 25, 2014
    Ratings:
    +2,204
    Local Time:
    12:59 AM
    Mainline
    10.2
  3. JarylW

    JarylW Active Member

    216
    41
    28
    Jun 19, 2014
    Singapore
    Ratings:
    +103
    Local Time:
    12:59 AM
    If you are not comfortable with dumping the database in cPanel, zipping the wordpressfiles and changing url manually (either via wp-config.php or editing the sql table)

    I recommend using this plugin as it automates everything and is more graphic for new users.

    WordPress › Duplicator « WordPress Plugins

    1) Install it on your current wordpress installation and run it. A .zip archive and install.php file will be created.

    I'm inclined to believe since you are using centminmod, it is good to stick with the standard install using centmin menu #22.

    2) At the end of the wp-cli install, there will be details of your wordpress db name, user and pass being printed out automatically.

    3) You can then delete everything in your vhost (/home/nginx/domains/yourdomain.com/public) and just upload the .zip and install file created in step 1.

    Navigate to yourdomain.com/install.php and key in your DB name, user and pass as noted in step 2.

    Select the 2nd option to overwrite database since menu option #22 already created the sql database and user with appropriate permissions for you.

    Let plugin do it's job : profit :
     
    Last edited: Oct 3, 2015
  4. harryneopotter

    harryneopotter Member

    70
    3
    8
    Aug 16, 2015
    Ratings:
    +8
    Local Time:
    10:29 PM
    Nginx 1.9.3
    MariaDB 10.0
    That is exactly what I was looking for. I just wasnt sure if this was a good idea as I dont know how the centmin menu 22 configures the WP environment to work with the nginx setup. If it is just a straight install, I can do the moving part myself. Thanks a lot, mate.
     
  5. JarylW

    JarylW Active Member

    216
    41
    28
    Jun 19, 2014
    Singapore
    Ratings:
    +103
    Local Time:
    12:59 AM
    When I first tested the centmin menu 22, I did a trial install with demowordpress.com domain to observe what is created and at where it was created. The verbose output at the end is really quite helpful. They can be deleted later anyway.

    There really isn't any rigid ways that you must setup your .conf files. But if you plan on following some of the guides that @eva2000 wrote such as Redis - How to install Redis server on Centmin Mod LEMP stack | Centmin Mod Community then I think it would be better to stick with the "centminmod way" to prevent confusion and slapping yourself in the face for some silly overlook (been there done that).

    It depends on your current setup really. The centmin menu 22 esentially configures your mysql databases, creates a user, grants the permission and via wp-cli installs wordpress with WP super cache and quite many other plugins. I believe a cronjob for updating is also set up.

    (Installing via centmin menu 22)
    If your current setup does not having any caching plugin (which really should not be the case) or you're not using WP super cache, simply comment out the try_files directive line under super cache plugin and uncomment the try_files directive line under wordpress permalink at /usr/local/nginx/conf/conf.d/yourdomain.com.conf


    # for wordpress super cache plugin
    #try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php?q=$uri&$args;

    # Wordpress Permalinks
    try_files $uri $uri/ /index.php?q=$uri&$args;

    Code:
      location / {
    
      # Enables directory listings when index file not found
      #autoindex  on;
    
      # for wordpress super cache plugin
      try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php?q=$uri&$args;
    
      # Wordpress Permalinks
      # try_files $uri $uri/ /index.php?q=$uri&$args;
    
    
      }


    Also the centmin menu 22 password protects wp-login.php by default with a random password that you will see after doing the option #22. I personally use Clef so I did not need it; I commented out

    #auth_basic "Private";
    #auth_basic_user_file /home/nginx/domains/yourdomain.com/htpasswd_wplogin;


    Code:
    location ~* /(wp-login\.php) {
        limit_req zone=xwplogin burst=1 nodelay;
        #limit_conn xwpconlimit 30;
        auth_basic "Private";
        auth_basic_user_file /home/nginx/domains/yourdomain.com/htpasswd_wplogin;
        include /usr/local/nginx/conf/php.conf;
    }
     
    Last edited: Oct 3, 2015
  6. negative

    negative Active Member

    415
    50
    28
    Apr 11, 2015
    Ratings:
    +98
    Local Time:
    7:59 PM
    1.9.10
    10.1.11
    Still i didn't see exactly answer about this question. Because, if you have a wordpress website which including custom add-ons and template, how can we move to centminmod's ready wordpress installation ?

    After setup new wordpress full configured via option #22:
    If we delete the public directory then important add-ons will be deleted too. Or we import the current wordpress backup database, then we will still lose the configurations too.

    So, which one easy way to move or existing wordpress to centminmod's nginx ? Because i want use centminmod's nginx installation but i wanna see my template and other a-few plugins too.

    Thanks (especially i m waiting an answer from @eva2000)
     
  7. eva2000

    eva2000 Administrator Staff Member

    55,187
    12,251
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,829
    Local Time:
    2:59 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    @RoldanLT 2nd post above at https://community.centminmod.com/posts/19237/ is basically it backup wp files + mysql database for wordpress site and transfer to new server to override the wordpress installed wp files and database done by centmin.sh menu option 22 should be fine. Nginx vhost config is retained just wp install by centmin.sh menu option 22 is lost and doesn't matter much if you are importing a working WP install site anyway

    you will need to install wp super cache plugin via wp-admin after you restore your existing wp site to new server so nginx vhost setup wp super cache works
     
    Last edited: Dec 21, 2015
  8. eva2000

    eva2000 Administrator Staff Member

    55,187
    12,251
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,829
    Local Time:
    2:59 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  9. dooma

    dooma Active Member

    326
    34
    28
    Oct 15, 2016
    Cairo
    Ratings:
    +49
    Local Time:
    6:59 PM
    Hello how can I import the database and the files ?
     
  10. eva2000

    eva2000 Administrator Staff Member

    55,187
    12,251
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,829
    Local Time:
    2:59 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    mysqldump/mysql command line for mysql backup/restore and tar/gzip/pigz etc for file backup and rsync for transfer. All specifics are outlined in detail for moving site data general guides below where the principles & steps of backing up and moving data is the same just slightly different for
    1. Moving Centmin Mod site data to another Centmin Mod server
    2. Moving cPanel/WHM site data to Centmin Mod server
    Those guides move alot more than just the site(s) in question but config files etc. You can use your own best judgement as to the config files and whether you want to move them or just use the fresh server setup Centmin Mod config files as they get auto optimised for the server Centmin Mod initially installed on.

    If your old site isn't centmin mod or cpanel/whm based, then those guides won't be 100% applicable. But the general overview of what needs moving and where everything is structured in Centmin Mod LEMP environment is worth reading up on.

    Also official site configuration files page explains the Centmin Mod structure of where the important files are so you can decide on what to backup.