Learn about Centmin Mod LEMP Stack today
Become a Member

Install Option 2 or 22 when migrating wordpress site?

Discussion in 'Install & Upgrades or Pre-Install Questions' started by Carlo, May 4, 2017.

  1. Carlo

    Carlo New Member

    8
    3
    3
    Apr 19, 2017
    Ratings:
    +3
    Local Time:
    6:55 PM
    Hi. I'm considering migrating an existing wordpress site from Ubuntu to CentOS using CMM. I am using Duplicator plugin which will package all the files and database so I don't really need to have wordpress software pre-installed. So should I use Option 2 for new vhost or Option 22 then overwrite the installed wordpress contents.

    If Option 22 has wordpress-specific server level optimizations that are configured, then I'd like to take advantage of that. But if none, then I'd just do a fresh install thru Option 2. I also want to use php 7 and let's encrypt. Should I use 123.09beta01 or betainstaller7?
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,160
    6,784
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,135
    Local Time:
    6:55 PM
    Nginx 1.13.x
    MariaDB 5.5
    Hi Carlo, you'd want to use centmin.sh menu option 22 and preferably with Centmin Mod 123.09beta01 as it's much improved. betainstaller7.sh install would probably best to start with and read in 1st post at https://centminmod.com/acmetool how to enable LETSENCRYPT_DETECT='y' before adding any vhosts.

    A similar question and my reply was the same for centmin.sh menu option 22 https://community.centminmod.com/th...whm-to-centminmod-wordpress.11581/#post-49326 I guess Wordpress Duplicator plugin could be handy for @netheroez as well too. Though the migration tips and links i mentioned in that thread apply to all sites wordpress or otherwise so worth learning long term :)
     
  3. Carlo

    Carlo New Member

    8
    3
    3
    Apr 19, 2017
    Ratings:
    +3
    Local Time:
    6:55 PM
    Thanks @eva2000 for the info. I tried to follow the steps and installed the WordPress site from Option 22. I managed to get get it running and also successfully installed a Let's Encrypt certificate. The site runs fine from my end and on https. However on other parts of the world, there is an SSL error.

    For example, I tried to do pingdom speed test and always get "SSL Connection Error" when testing from Melbourne but its ok from Dallas. I tried both Option 3 and 4 from the Let's encrypt submenu, same results.

    I'm also using WP Rocket plugin for caching. For nginx settings, I was following the guide from GitHub - maximejobin/rocket-nginx: Nginx configuration for WP-Rocket

    The instructions are applicable in Ubuntu but I'm not sure what to edit from the Centmin mod setup. For example, there's is no /etc/nginx/sites-available

    Hope you can help. Thanks a lot.
     
  4. eva2000

    eva2000 Administrator Staff Member

    30,160
    6,784
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,135
    Local Time:
    6:55 PM
    Nginx 1.13.x
    MariaDB 5.5
    what does your nginx vhost for domain.com.ssl.conf look like now ? wrap in CODE tags
     
  5. Carlo

    Carlo New Member

    8
    3
    3
    Apr 19, 2017
    Ratings:
    +3
    Local Time:
    6:55 PM
    It looks like below. I used Duplicator to overwrite the initial install.

    Code:
    # Centmin Mod Getting Started Guide
    # must read http://centminmod.com/getstarted.html
    # For SPDY SSL Setup
    # read http://centminmod.com/nginx_configure_https_ssl_spdy.html
     
    # redirect from www to non-www forced SSL
    # uncomment, save file and restart Nginx to enable
    # if unsure use return 302 before using return 301
    # server {
    # server_name cottoncuddles.net www.cottoncuddles.net;
    # return 302 https://$server_name$request_uri;
    # }
     
    server {
    listen 443 ssl http2;
    server_name cottoncuddles.net www.cottoncuddles.net;
     
    include /usr/local/nginx/conf/ssl/cottoncuddles.net/cottoncuddles.net.crt.key.conf;
    include /usr/local/nginx/conf/ssl_include.conf;
     
    http2_max_field_size 16k;
    http2_max_header_size 32k;
    # mozilla recommended
    ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA256:EECDH+ECDSA+SHA384:EECDH+aRSA+SHA256:EECDH+aRSA+SHA384:EECDH+AES128:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!CAMELLIA;
    ssl_prefer_server_ciphers on;
    #add_header Alternate-Protocol 443:npn-spdy/3;
     
    # before enabling HSTS line below read centminmod.com/nginx_domain_dns_setup.html#hsts
    #add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
    #add_header X-Frame-Options SAMEORIGIN;
    #add_header X-Xss-Protection "1; mode=block" always;
    #add_header X-Content-Type-Options "nosniff" always;
    #spdy_headers_comp 5;
    ssl_buffer_size 1369;
    ssl_session_tickets on;
     
    # enable ocsp stapling
    resolver 8.8.8.8 8.8.4.4 valid=10m;
    resolver_timeout 10s;
    ssl_stapling on;
    ssl_stapling_verify on;
     
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
     
    #add_header X-Frame-Options SAMEORIGIN;
    #add_header X-Xss-Protection "1; mode=block" always;
    #add_header X-Content-Type-Options "nosniff" always;
     
    # limit_conn limit_per_ip 16;
    # ssi on;
     
    access_log /home/nginx/domains/cottoncuddles.net/log/access.log main_ext buffer=256k flush=60m;
    error_log /home/nginx/domains/cottoncuddles.net/log/error.log;
     
    include /usr/local/nginx/conf/autoprotect/cottoncuddles.net/autoprotect-cottoncuddles.net.conf;
    root /home/nginx/domains/cottoncuddles.net/public;
    # uncomment cloudflare.conf include if using cloudflare for
    # server and/or vhost site
    #include /usr/local/nginx/conf/cloudflare.conf;
    include /usr/local/nginx/conf/503include-main.conf;
     
    #include /usr/local/nginx/conf/wpincludes/cottoncuddles.net/wpcacheenabler_cottoncuddles.net.conf;
    #include /usr/local/nginx/conf/wpincludes/cottoncuddles.net/wpsupercache_cottoncuddles.net.conf;
    # https://community.centminmod.com/posts/18828/
    include /usr/local/nginx/conf/wpincludes/cottoncuddles.net/rediscache_cottoncuddles.net.conf;
     
    location / {
    include /usr/local/nginx/conf/503include-only.conf;
     
     
    # 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;
     
    # for wp cache enabler plugin
    #try_files $cache_enabler_uri $uri $uri/ $custom_subdir/index.php?$args;
     
    # Wordpress Permalinks
    #try_files $uri $uri/ /index.php?q=$uri&$args;
     
    # Nginx level redis Wordpress
    # https://community.centminmod.com/posts/18828/
    try_files $uri $uri/ /index.php?$args;
     
    }
     
    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/cottoncuddles.net/htpasswd_wplogin; 
    #include /usr/local/nginx/conf/php-wpsc.conf;
    # https://community.centminmod.com/posts/18828/
    include /usr/local/nginx/conf/php-rediscache.conf;
    }
     
    location ~* /(xmlrpc\.php) {
    limit_req zone=xwprpc burst=45 nodelay;
    #limit_conn xwpconlimit 30;
    #include /usr/local/nginx/conf/php-wpsc.conf;
    # https://community.centminmod.com/posts/18828/
    include /usr/local/nginx/conf/php-rediscache.conf;
    }
     
    include /usr/local/nginx/conf/wpincludes/cottoncuddles.net/wpsecure_cottoncuddles.net.conf;
    #include /usr/local/nginx/conf/php-wpsc.conf;
    # https://community.centminmod.com/posts/18828/
    include /usr/local/nginx/conf/php-rediscache.conf;
    include /usr/local/nginx/conf/staticfiles.conf;
    include /usr/local/nginx/conf/drop.conf;
    #include /usr/local/nginx/conf/errorpage.conf;
    include /usr/local/nginx/conf/vts_server.conf;
    }
     
     
  6. eva2000

    eva2000 Administrator Staff Member

    30,160
    6,784
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,135
    Local Time:
    6:55 PM
    Nginx 1.13.x
    MariaDB 5.5
    looks like you're using redis caching at nginx level so really don't need wprocket

    try testing with gtmetrix.com and webpagetest.org instead of pingdom could be issue specific to pingdom
     
  7. Carlo

    Carlo New Member

    8
    3
    3
    Apr 19, 2017
    Ratings:
    +3
    Local Time:
    6:55 PM
    Yeah it looks like its working on other test sites so probably just pingdom with issues. Thanks for your input!
     
    • Like Like x 1