Learn about Centmin Mod LEMP Stack today
Become a Member

Beta Branch Preview: Wordpress + WP Super Cache installer - centmin.sh option 22

Discussion in 'Beta release code' started by eva2000, Apr 9, 2015.

  1. eva2000

    eva2000 Administrator Staff Member

    30,947
    6,915
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,413
    Local Time:
    2:32 PM
    Nginx 1.13.x
    MariaDB 5.5

    Wordpress Nginx Vhost + Wordpress Installer



    Update: I've also added to official site a demo for the centmin.sh menu option 22 auto installer for Wordpress and Wordpress Super Cache at http://centminmod.com/nginx-wordpress-installer.html it has backported Nginx SSL vhost generation as well Install - Centmin Mod 1.2.3-eva2000.08 how to install & update

    Added to Centmin Mod .08 beta 02 a new centmin.sh menu option 22 to auto install Wordpress + WP Super Cache and other WP Plugins + also auto setup and create the Nginx vhost specifically for Wordpress and WP Super Cache support.

    As part of centmin.sh menu option 22 routine, it will auto create a cronjob script to auto update all Wordpress Plugins every 8 hours and email you a status update for all WP Plugins and their current status. Also the script will setup wp-login.php with password protection as an additional layer of security.

    Code:
    --------------------------------------------------------
    Centmin Mod 1.2.3-eva2000.08 - http://centminmod.com
    --------------------------------------------------------
                       Centmin Mod Menu       
    --------------------------------------------------------
    1).  Centmin Install
    2).  Add Nginx vhost domain
    3).  NSD setup domain name DNS
    4).  Nginx Upgrade / Downgrade
    5).  PHP Upgrade / Downgrade
    6).  XCache Re-install
    7).  APC Cache Re-install
    8).  XCache Install
    9).  APC Cache Install
    10). Memcached Server Re-install
    11). MariaDB 5.2, 5.5, 10 Upgrade Sub-Menu
    12). Zend OpCache Install/Re-install
    13). Install ioping.sh vbtechsupport.com/1239/
    14). SELinux disable
    15). Install/Re-install ImageMagick PHP Extension
    16). Change SSHD Port Number
    17). Multi-thread compression: pigz,pbzip2,lbzip2,p7zip etc
    18). Suhosin PHP Extension install
    19). Install FFMPEG and FFMPEG PHP Extension
    20). NSD Re-install
    21). Update - Nginx + PHP-FPM + Siege
    22). Add Wordpress Nginx vhost + WP Super Cache
    23). Exit
    --------------------------------------------------------
    Enter option [ 1 - 23 ] 22
    --------------------------------------------------------
    There are currently 27 default installed WP Plugins of which some are activated by default and others are left to end user to activate if they want. The are the latest versions of these listed Wordpress Plugins:

    A = activated and I = inactive
    Code:
      A wp-security-scan                4.0.5
      I addthis-smart-layers            1.0.10
      I akismet                         3.1.1
      A autoptimize                     1.9.2
      I db-cache-reloaded-fix           2.3
      A disable-xml-rpc                 1.0.1
      I go-newrelic                     0.3
      A google-analytics-for-wordpress  5.3.3
      I google-authenticator            0.47
      A gtmetrix-for-wordpress          0.4.1
      I hello                           1.6
      A limit-login-attempts            1.7.1
      A no-longer-in-directory          1.0.39
      A p3-profiler                     1.5.3.8
      I query-monitor                   2.7.2
      A rocket-lazy-load                1.0.3
      I search-regex                    1.4.15
      A sucuri-scanner                  1.7.8
      A tpc-memory-usage                0.9.1
      A updraftplus                     1.9.63
      A wordpress-seo                   2.0.1
      A wp-optimize                     1.8.9.10
      A wp-super-cache                  1.4.4
      A wp-super-cache-clear-cache-menu 1.3.1
      A wp-updates-notifier             1.4.1
      A wp-widget-cache                 0.26
    
    Code:
    ./centmin.sh
    
    --------------------------------------------------------
    Centmin Mod 1.2.3-eva2000.08 - http://centminmod.com
    --------------------------------------------------------
                       Centmin Mod Menu             
    --------------------------------------------------------
    1).  Centmin Install
    2).  Add Nginx vhost domain
    3).  NSD setup domain name DNS
    4).  Nginx Upgrade / Downgrade
    5).  PHP Upgrade / Downgrade
    6).  XCache Re-install
    7).  APC Cache Re-install
    8).  XCache Install
    9).  APC Cache Install
    10). Memcached Server Re-install
    11). MariaDB 5.2, 5.5, 10 Upgrade Sub-Menu
    12). Zend OpCache Install/Re-install
    13). Install ioping.sh vbtechsupport.com/1239/
    14). SELinux disable
    15). Install/Re-install ImageMagick PHP Extension
    16). Change SSHD Port Number
    17). Multi-thread compression: pigz,pbzip2,lbzip2,p7zip etc
    18). Suhosin PHP Extension install
    19). Install FFMPEG and FFMPEG PHP Extension
    20). NSD Re-install
    21). Update - Nginx + PHP-FPM + Siege
    22). Add Wordpress Nginx vhost + WP Super Cache
    23). Exit
    --------------------------------------------------------
    Enter option [ 1 - 23 ] 22
    --------------------------------------------------------
    ------------------------------------------------------------
    Installing wpcli.sh
    ------------------------------------------------------------
    installing...
    Package git-1.8.3.1-4.el7.x86_64 already installed and latest version
    
    Error: /usr/bin/wp not found !!! Download now......
    2015-04-09 05:11:12 URL:https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar [1342749/1342749] -> "/usr/bin/wp" [1]
    Download done.
    
    Error: /root/wpcli/wp-completion.bash not found !!! Download now......
    2015-04-09 05:11:14 URL:https://raw.githubusercontent.com/wp-cli/wp-cli/master/utils/wp-completion.bash [446/446] -> "/root/wpcli/wp-completion.bash" [1]
    Download done.
    
    
    -------------------------------------------------------------
    PHP binary:     /usr/local/bin/php
    PHP version:    5.4.39
    php.ini used:   /usr/local/lib/php.ini
    WP-CLI root dir:        phar://wp-cli.phar
    WP-CLI global config:
    WP-CLI project config:
    WP-CLI version: 0.18.0
    -------------------------------------------------------------
    
    -------------------------------------------------------------
    wp-cli install completed
    Read http://wp-cli.org/ for full usage info
    
    -------------------------------------------------------------
    Please log out of SSH session and log back in
    You can then call wp-cli via command: wp
    i.e. wp --info --allow-root
    -------------------------------------------------------------
    
    ---------------------------------------------
    Setup full Nginx vhost + Wordpress + WP Super Cache
    ---------------------------------------------
    
    Enter vhost domain name you want to add (without www. prefix): newdomain2.com
    Enter email address for Wordpress Installation: youremail@
    
    !! make sure email address is valid and typed correctly !!
    Enter email address for Wordpress Installation: youremail@newdomain2.com
    
    Create FTP username for vhost domain (enter username): USERNAME
    Create FTP password for USERNAME (enter password): PASSWORD
    
    FTP username you entered: USERNAME
    FTP password you entered: PASSWORD
    
    Password:
    Enter it again:
    ------------------------------------------------------------
    Setup Wordpress + Super Cache for newdomain2.com
    ------------------------------------------------------------
    Downloading WordPress 4.1.1 (en_US)...
    Success: WordPress downloaded.
    Success: Generated wp-config.php file.
    Success: WordPress installed successfully.
    ------------------------------------------------------------
    Installing Responsive (1.9.7.6)
    Downloading install package from http://downloads.wordpress.org/theme/responsive.1.9.7.6.zip...
    Unpacking the package...
    Installing the theme...
    Theme installed successfully.
    Activating 'responsive'...
    Success: Switched to 'Responsive' theme.
    ------------------------------------------------------------
    ------------------------------------------------------------
    Installing WP Super Cache (1.4.4)
    Downloading install package from https://downloads.wordpress.org/plugin/wp-super-cache.1.4.4.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    Activating 'wp-super-cache'...
    Success: Plugin 'wp-super-cache' activated.
    ------------------------------------------------------------
    Installing WP Super Cache - Clear all cache (1.3.1)
    Downloading install package from https://downloads.wordpress.org/plugin/wp-super-cache-clear-cache-menu.1.3.1.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    Activating 'wp-super-cache-clear-cache-menu'...
    Success: Plugin 'wp-super-cache-clear-cache-menu' activated.
    ------------------------------------------------------------
    Installing WP Widget Cache (0.26)
    Downloading install package from https://downloads.wordpress.org/plugin/wp-widget-cache.0.26.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    Activating 'wp-widget-cache'...
    Success: Plugin 'wp-widget-cache' activated.
    ------------------------------------------------------------
    Installing Autoptimize (1.9.2)
    Downloading install package from https://downloads.wordpress.org/plugin/autoptimize.1.9.2.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    Activating 'autoptimize'...
    Success: Plugin 'autoptimize' activated.
    ------------------------------------------------------------
    Installing Rocket Lazy Load (1.0.3)
    Downloading install package from https://downloads.wordpress.org/plugin/rocket-lazy-load.1.0.3.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    Activating 'rocket-lazy-load'...
    Success: Plugin 'rocket-lazy-load' activated.
    ------------------------------------------------------------
    Installing Acunetix WP Security (4.0.5)
    Downloading install package from https://downloads.wordpress.org/plugin/wp-security-scan.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    Activating 'wp-security-scan'...
    Success: Plugin 'wp-security-scan' activated.
    ------------------------------------------------------------
    Installing Sucuri Security - Auditing, Malware Scanner and Security Hardening (1.7.8)
    Downloading install package from https://downloads.wordpress.org/plugin/sucuri-scanner.1.7.8.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    Activating 'sucuri-scanner'...
    Success: Plugin 'sucuri-scanner' activated.
    ------------------------------------------------------------
    Installing Disable XML-RPC (1.0.1)
    Downloading install package from https://downloads.wordpress.org/plugin/disable-xml-rpc.1.0.1.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    Activating 'disable-xml-rpc'...
    Success: Plugin 'disable-xml-rpc' activated.
    ------------------------------------------------------------
    Installing Limit Login Attempts (1.7.1)
    Downloading install package from https://downloads.wordpress.org/plugin/limit-login-attempts.1.7.1.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    Activating 'limit-login-attempts'...
    Success: Plugin 'limit-login-attempts' activated.
    ------------------------------------------------------------
    Installing WP Updates Notifier (1.4.1)
    Downloading install package from https://downloads.wordpress.org/plugin/wp-updates-notifier.1.4.1.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    Activating 'wp-updates-notifier'...
    Success: Plugin 'wp-updates-notifier' activated.
    ------------------------------------------------------------
    Installing No Longer in Directory (1.0.39)
    Downloading install package from https://downloads.wordpress.org/plugin/no-longer-in-directory.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    Activating 'no-longer-in-directory'...
    Success: Plugin 'no-longer-in-directory' activated.
    ------------------------------------------------------------
    Installing WP-Optimize (1.8.9.10)
    Downloading install package from https://downloads.wordpress.org/plugin/wp-optimize.1.8.9.10.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    Activating 'wp-optimize'...
    Success: Plugin 'wp-optimize' activated.
    ------------------------------------------------------------
    Installing TPC! Memory Usage (0.9.1)
    Downloading install package from https://downloads.wordpress.org/plugin/tpc-memory-usage.0.9.1.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    Activating 'tpc-memory-usage'...
    Success: Plugin 'tpc-memory-usage' activated.
    ------------------------------------------------------------
    Installing GTmetrix for WordPress (0.4.1)
    Downloading install package from https://downloads.wordpress.org/plugin/gtmetrix-for-wordpress.0.4.1.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    Activating 'gtmetrix-for-wordpress'...
    Success: Plugin 'gtmetrix-for-wordpress' activated.
    ------------------------------------------------------------
    Installing P3 (Plugin Performance Profiler) (1.5.3.8)
    Downloading install package from https://downloads.wordpress.org/plugin/p3-profiler.1.5.3.8.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    Activating 'p3-profiler'...
    Success: Plugin 'p3-profiler' activated.
    ------------------------------------------------------------
    Installing WordPress SEO by Yoast (2.0.1)
    Downloading install package from https://downloads.wordpress.org/plugin/wordpress-seo.2.0.1.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    Activating 'wordpress-seo'...
    Success: Plugin 'wordpress-seo' activated.
    ------------------------------------------------------------
    Installing UpdraftPlus Backup and Restoration (1.9.63)
    Downloading install package from https://downloads.wordpress.org/plugin/updraftplus.1.9.63.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    Activating 'updraftplus'...
    Success: Plugin 'updraftplus' activated.
    ------------------------------------------------------------
    Installing Google Analytics by Yoast (5.3.3)
    Downloading install package from https://downloads.wordpress.org/plugin/google-analytics-for-wordpress.5.3.3.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    Activating 'google-analytics-for-wordpress'...
    Success: Plugin 'google-analytics-for-wordpress' activated.
    ------------------------------------------------------------
    ------------------------------------------------------------
    Installing Query Monitor (2.7.2)
    Downloading install package from https://downloads.wordpress.org/plugin/query-monitor.2.7.2.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    ------------------------------------------------------------
    Installing Gigaom New Relic (0.3)
    Downloading install package from https://downloads.wordpress.org/plugin/go-newrelic.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    ------------------------------------------------------------
    Installing DB Cache Reloaded Fix (2.3)
    Downloading install package from https://downloads.wordpress.org/plugin/db-cache-reloaded-fix.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    ------------------------------------------------------------
    Installing Google Authenticator (0.47)
    Downloading install package from https://downloads.wordpress.org/plugin/google-authenticator.0.47.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    ------------------------------------------------------------
    Installing Smart Layers by AddThis (1.0.10)
    Downloading install package from https://downloads.wordpress.org/plugin/addthis-smart-layers.1.0.10.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    ------------------------------------------------------------
    Installing Search Regex (1.4.15)
    Downloading install package from https://downloads.wordpress.org/plugin/search-regex.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    ------------------------------------------------------------
    Downloading update from https://downloads.wordpress.org/plugin/akismet.3.1.1.zip...
    Unpacking the update...
    Installing the latest version...
    Removing the old version of the plugin...
    Plugin updated successfully.
    Success: Updated 1/1 plugins.
    
    27 installed plugins:
      A wp-security-scan                4.0.5
      I addthis-smart-layers            1.0.10
      I akismet                         3.1.1
      A autoptimize                     1.9.2
      I db-cache-reloaded-fix           2.3
      A disable-xml-rpc                 1.0.1
      I go-newrelic                     0.3
      A google-analytics-for-wordpress  5.3.3
      I google-authenticator            0.47
      A gtmetrix-for-wordpress          0.4.1
      I hello                           1.6
      A limit-login-attempts            1.7.1
      A no-longer-in-directory          1.0.39
      A p3-profiler                     1.5.3.8
      I query-monitor                   2.7.2
      A rocket-lazy-load                1.0.3
      I search-regex                    1.4.15
      A sucuri-scanner                  1.7.8
      A tpc-memory-usage                0.9.1
      A updraftplus                     1.9.63
      A wordpress-seo                   2.0.1
      A wp-optimize                     1.8.9.10
      A wp-super-cache                  1.4.4
      A wp-super-cache-clear-cache-menu 1.3.1
      A wp-updates-notifier             1.4.1
      A wp-widget-cache                 0.26
      M p3-profiler             
    
    Legend: A = Active, I = Inactive, M = Must Use
    ------------------------------------------------------------
    ------------------------------------------------------------
    Created uninstall script
    /root/tools/wp_uninstall_newdomain2.com.sh
    ------------------------------------------------------------
    ------------------------------------------------------------
    Created wp_updater_newdomain2.com.sh script
    /root/tools/wp_updater_newdomain2.com.sh
    ------------------------------------------------------------
    */4 * * * * /usr/bin/cminfo_updater
    * */8 * * * /root/tools/wp_updater_newdomain2.com.sh 2>/dev/null
    
    ---------------------------------------------
    service nginx reload
    Reloading nginx configuration (via systemctl):  [  OK  ]
    systemctl restart pure-ftpd.service
    
    ---------------------------------------------
    FTP hostname : xxx.xxx.xxx.xxx
    FTP port : 21
    FTP mode : FTP (explicit SSL)
    FTP Passive (PASV) : ensure is checked/enabled
    FTP username created for newdomain2.com : USERNAME
    FTP password created for newdomain2.com : PASSWORD
    ---------------------------------------------
    
    ------------------------------------------------------------
    newdomain2.com created
    nginx vhost: /usr/local/nginx/conf/conf.d/newdomain2.com.conf
    newdomain2.com public web root: /home/nginx/domains/newdomain2.com/public
    newdomain2.com log directory: /home/nginx/domains/newdomain2.com/log
    
    ------------------------------------------------------------
    SSH commands to uninstall created Wordpress install and Nginx vhost:
      /root/tools/wp_uninstall_newdomain2.com.sh
    ------------------------------------------------------------
    
    ------------------------------------------------------------
    Wordpress Auto Updater created at:
      /root/tools/wp_updater_newdomain2.com.sh
    cronjob set for every 8 hours update (3x times per day)
    ------------------------------------------------------------
    
    Wordpress domain: newdomain2.com
    Wordpress DB Name: wp28500db_21319
    Wordpress DB User: wpdb21319USERNAME0756
    Wordpress DB Pass: wpdbKJIvYxztT7xbp4526
    Wordpress Admin User: zA9DWBWRBvG7wwPASSWORD0607
    Wordpress Admin Pass: zG+9kHgu6yhhwps30370
    Wordpress Admin Email: youremail@newdomain2.com
    
    ------------------------------------------------------------
    To complete setup:
    1. Enable Permalinks (DO NOT use links with .html extensions for performance reasons) i.e. /%post_id%/%postname%/
    2. Settings Menu > Super Cache > Easy tab and enable it by checking Caching On (Recommended) and hit Update Status
    3. Advanced tab & check Use mod_rewrite serve cache files & Don’t cache pages with GET parameters and Known User.
       (Recommended) & hit Update Status
    4. WP Security Menu > Settings > Check All except Enable Live Traffic tool and hit Update settings
    5. Settings Menu > Updates Notifier and setup your notify email address and cronjob (save and test button to check)
    6. Settings Mnenu > Autoptimize and check Optimize HTML, JavaScript and CSS options (show advanced settings)
    7. Settings Menu > Limit Login Attempts and configure as desired or leave as defaults
    8. Sucuri Security Menu and top left click Generate API key for your domain/email and configure your Settings tab
    9. WP-Optimize Menu and configure as needed
    10. Memory Usage Menu > Settings and adjust accordingly
    11. GTmetrix Menu > setup and register your GTmetrix Account and API Key
    12. go-newrelic plugin installed but not activated read https://wordpress.org/plugins/go-newrelic/installation/
    13. Tools > P3 Plugin Profiler > Start Scan to profile all your plugins
    14. Plugins > Query Monitor is disabled by default, enable to check MySQL query stats
    15. Plugins > DB Cache Reloaded disabled by default unsure if works with Wordpress 4.x ?
    16. Appearance > Theme Options (Responsive theme) > Home Page nav bar > Uncheck Overrides Wordpress front page option
    17. Seo Menu (Yoast SEO) > configure accordingly
    18. Settings > UpdraftPlus Backups > Settings set file/database backup intervals & optional backup to remote storage
    19. Analytics > Settings > configure your Google Analytics UA Code
    ------------------------------------------------------------
    

    Code:
    /home/nginx/domains/newdomain2.com/public
    Success: WP-CLI is at the latest version.
    33 installed plugins:
      A wp-security-scan                4.0.5
      I addthis-smart-layers            1.0.10
      I akismet                         3.1.1
      A autoptimize                     1.9.2
      I backupwordpress                 3.2.4
      I db-cache-reloaded-fix           2.3
      A disable-xml-rpc                 1.0.1
      I go-newrelic                     0.3
      A google-analytics-for-wordpress  5.3.3
      I google-authenticator            0.47
      A gtmetrix-for-wordpress          0.4.1
      I hello                           1.6
      A jetpack                         3.4.1
      A limit-login-attempts            1.7.1
      A no-longer-in-directory          1.0.39
      A p3-profiler                     1.5.3.8
      I query-monitor                   2.7.1
      I recent-tweets-slider            1.0.1
      A rocket-lazy-load                1.0.3
      I search-regex                    1.4.15
      A sucuri-scanner                  1.7.8
      A theme-check                     20141222.1
      A tpc-memory-usage                0.9.1
      A updraftplus                     1.9.63
      I w3-total-cache                  0.9.4.1
      A wordpress-seo                   2.0.1
      A wp-optimize                     1.8.9.10
      A wp-smushit                      1.7.1.1
      A wp-super-cache                  1.4.4
      A wp-super-cache-clear-cache-menu 1.3.1
      A wp-updates-notifier             1.4.1
      A wp-widget-cache                 0.26
      M p3-profiler
    
    Legend: A = Active, I = Inactive, M = Must Use
    Success: Updated 0/0 plugins.

    After install via centmin.sh menu option 22, you can find install log in /root/centminlogs
    Code:
    ls -lArt /root/centminlogs/
    total 4664
    -rw-r--r--. 1 root root   17209 Apr  3 01:49 centminmod_1.2.3-eva2000.08_030415-114321_yuminstall_centos7.log
    -rw-r--r--. 1 root root   75088 Apr  3 01:50 centminmod_yumtimes_030415-114321.log
    -rw-r--r--. 1 root root   29291 Apr  3 02:08 centminmod_1.2.3-eva2000.08_030415-114321_yum-log.log
    -rw-r--r--. 1 root root 4608802 Apr  3 02:08 centminmod_1.2.3-eva2000.08_030415-114321_install.log
    -rw-r--r--  1 root root    1607 Apr  5 06:46 centminmod_1.2.3-eva2000.08_050415-064607_nginx_addvhost.log
    -rw-r--r--  1 root root   18774 Apr  9 05:15 centminmod_1.2.3-eva2000.08_090415-051033_wordpress_addvhost.log
     
    Last edited: Sep 3, 2015
    • Like Like x 1
  2. eva2000

    eva2000 Administrator Staff Member

    30,947
    6,915
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,413
    Local Time:
    2:32 PM
    Nginx 1.13.x
    MariaDB 5.5
    Last edited: Apr 9, 2015
  3. eva2000

    eva2000 Administrator Staff Member

    30,947
    6,915
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,413
    Local Time:
    2:32 PM
    Nginx 1.13.x
    MariaDB 5.5
    Latest Centmin Mod .08 beta 02 commit adds wp-login.php password protection as an additional layer of security.

    New example output edit: hmmm might need to adjust the cronjob so that if you had multiple auto WP setup nginx vhosts they do not end up running updates at the same time.
    Code:
    ------------------------------------------------------------
    Created wp_updater_newdomain8.com.sh script
    /root/tools/wp_updater_newdomain8.com.sh
    ------------------------------------------------------------
    0 */4 * * * /usr/bin/cminfo_updater
    0 */8 * * * /root/tools/wp_updater_newdomain2.com.sh 2>/dev/null
    0 */8 * * * /root/tools/wp_updater_newdomain3.com.sh 2>/dev/null
    0 */8 * * * /root/tools/wp_updater_newdomain4.com.sh 2>/dev/null
    0 */8 * * * /root/tools/wp_updater_newdomain8.com.sh 2>/dev/null
    
    ---------------------------------------------
    service nginx reload
    Reloading nginx configuration (via systemctl):  [  OK  ]
    systemctl restart pure-ftpd.service
    
    ---------------------------------------------
    FTP hostname : xxx.xxx.xxx.xxx
    FTP port : 21
    FTP mode : FTP (explicit SSL)
    FTP Passive (PASV) : ensure is checked/enabled
    FTP username created for newdomain8.com : u9
    FTP password created for newdomain8.com : p9
    ---------------------------------------------
    
    ------------------------------------------------------------
    newdomain8.com created
    nginx vhost: /usr/local/nginx/conf/conf.d/newdomain8.com.conf
    newdomain8.com public web root: /home/nginx/domains/newdomain8.com/public
    newdomain8.com log directory: /home/nginx/domains/newdomain8.com/log
    
    Code:
    ------------------------------------------------------------
    SSH commands to uninstall created Wordpress install and Nginx vhost:
      /root/tools/wp_uninstall_newdomain8.com.sh
    ------------------------------------------------------------
    
    ------------------------------------------------------------
    Wordpress Auto Updater created at:
      /root/tools/wp_updater_newdomain8.com.sh
    cronjob set for every 8 hours update (3x times per day)
    ------------------------------------------------------------
    
    Wordpress domain: newdomain8.com
    Wordpress DB Name: wp13266db_9447
    Wordpress DB User: wpdb9447u11104
    Wordpress DB Pass: wpdb4RhxZui7dP/np14461
    Wordpress Admin User: zeA0VqupjMXp6wp29485
    Wordpress Admin Pass: zLjW7w2Tm1SYwps22257
    Wordpress Admin Email: youruser@address.com
    
    Wordpress wp-login.php password protection info:
    wp-login.php protection file /home/nginx/domains/newdomain8.com/htpasswd_wplogin
    wp-login.php protection Username: ul1hchbyhDMyYAx16979
    wp-login.php protection Password: puIT/3eZDxN08ARn/kE5y16979
    
    Resetting wp-login.php protection:
    Step 1. remove protection file at /home/nginx/domains/newdomain8.com/htpasswd_wplogin
         rm -rf /home/nginx/domains/newdomain8.com/htpasswd_wplogin
    Step 2. run command:
         /usr/local/nginx/conf/htpasswd.sh create /home/nginx/domains/newdomain8.com/htpasswd_wplogin YOURUSERNAME YOURPASSWORD
    Step 3. restart Nginx + PHP-FPM services
         nprestart
    
    Code:
    ------------------------------------------------------------
    To complete setup:
    1. Enable Permalinks (DO NOT use links with .html extensions for performance reasons) i.e. /%post_id%/%postname%/
    2. Settings Menu > Super Cache > Easy tab and enable it by checking Caching On (Recommended) and hit Update Status
    3. Advanced tab & check Use mod_rewrite serve cache files & Don’t cache pages with GET parameters and Known User.
       (Recommended) & hit Update Status
    4. WP Security Menu > Settings > Check All except Enable Live Traffic tool and hit Update settings
    5. Settings Menu > Updates Notifier and setup your notify email address and cronjob (save and test button to check)
    6. Settings Mnenu > Autoptimize and check Optimize HTML, JavaScript and CSS options (show advanced settings)
    7. Settings Menu > Limit Login Attempts and configure as desired or leave as defaults
    8. Sucuri Security Menu and top left click Generate API key for your domain/email and configure your Settings tab
    9. WP-Optimize Menu and configure as needed
    10. Memory Usage Menu > Settings and adjust accordingly
    11. GTmetrix Menu > setup and register your GTmetrix Account and API Key
    12. go-newrelic plugin installed but not activated read https://wordpress.org/plugins/go-newrelic/installation/
    13. Tools > P3 Plugin Profiler > Start Scan to profile all your plugins
    14. Plugins > Query Monitor is disabled by default, enable to check MySQL query stats
    15. Plugins > DB Cache Reloaded disabled by default unsure if works with Wordpress 4.x ?
    16. Appearance > Theme Options (Responsive theme) > Home Page nav bar > Uncheck Overrides Wordpress front page option
    17. Seo Menu (Yoast SEO) > configure accordingly
    18. Settings > UpdraftPlus Backups > Settings set file/database backup intervals & optional backup to remote storage
    19. Analytics > Settings > configure your Google Analytics UA Code
    ------------------------------------------------------------
    edit: okay randomising cron launch time via sleep :)

    Code:
    ------------------------------------------------------------
    Created wp_updater_newdomain9.com.sh script
    /root/tools/wp_updater_newdomain9.com.sh
    ------------------------------------------------------------
    */4 * * * * /usr/bin/cminfo_updater
    0 */8 * * * /root/tools/wp_updater_newdomain2.com.sh 2>/dev/null
    0 */8 * * * /root/tools/wp_updater_newdomain3.com.sh 2>/dev/null
    0 */8 * * * /root/tools/wp_updater_newdomain4.com.sh 2>/dev/null
    0 */8 * * * /root/tools/wp_updater_newdomain8.com.sh 2>/dev/null
    0 */8 * * * sleep 776s ;/root/tools/wp_updater_newdomain9.com.sh 2>/dev/null
     
    Last edited: Apr 9, 2015
    • Like Like x 1
    • Winner Winner x 1
  4. Matt Williams

    Matt Williams WordPress Fanatic

    468
    90
    28
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +135
    Local Time:
    11:32 PM
    latest
    10
    I am in love with this feature more then my own wife :=) Thank you George! Your amazing my friend!
     
  5. eva2000

    eva2000 Administrator Staff Member

    30,947
    6,915
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,413
    Local Time:
    2:32 PM
    Nginx 1.13.x
    MariaDB 5.5
    haha don't let the wife see this :) It's in part due to support of Premium Members like yourself who had first access to the standalone wordpress auto installer, wpcli_wordpress.sh and provided further testing and feedback to improve it. The new centmin.sh menu option 22 is basically based on that standalone wordpress auto installer with further improvements of course :D
     
  6. Matt Williams

    Matt Williams WordPress Fanatic

    468
    90
    28
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +135
    Local Time:
    11:32 PM
    latest
    10
    I see you added the .htaccess for wp login - Fantastic! I incorporate the on shared servers. However, for the VPS's that don't have the new centmin w/ this wonderful new feature, is their a separate bash script that you may have handy to add to the other VM's? I'd like to add this to all of them that I have so having a bash script would be great to create the .htaccess file for wp login.

    Or - how would I upgrade a VM to the newest 8beta02?
     
  7. eva2000

    eva2000 Administrator Staff Member

    30,947
    6,915
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,413
    Local Time:
    2:32 PM
    Nginx 1.13.x
    MariaDB 5.5
    no separate bash script right now... not enough free time

    as to updating .08 beta 02 first post at CentOS 7.x - How to help test .08 CentOS 7 Betas with Github code ? | Centmin Mod Community or using git Upgrade - Working with git command line for updating Centmin Mod local copies | Centmin Mod Community to update (much easier)
     
  8. eva2000

    eva2000 Administrator Staff Member

    30,947
    6,915
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,413
    Local Time:
    2:32 PM
    Nginx 1.13.x
    MariaDB 5.5
  9. Matt Williams

    Matt Williams WordPress Fanatic

    468
    90
    28
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +135
    Local Time:
    11:32 PM
    latest
    10
    One small issue - If someone has a primary domain name ( domain.com ) with a full WP install, then has 2 others ( domain.com/ca AND domain.com/au ) would I just run them under menu #22 as

    Domain.com
    Domain.com/ca
    Domain.com/au

    Because I did it this way and it didn't create the vhost file for /ca or /au or would I just add them as a sub domain like:
    ca.domain.com
    au.domain.com

    and then figure a way to call them as domain.com/ca AND domain.com/au
    ??

    It created the WP account and all files under /home/nginx/domains/domain.com.com/ca/public
    /home/nginx/domains/domain.com.com/au/public

    but not
    /home/nginx/domains/timetocleanse.com/public/au
    /home/nginx/domains/timetocleanse.com/public/ca

    What I opened
    /usr/local/nginx/conf/conf.d/domain.com/ca.conf - blank vhost
    /usr/local/nginx/conf/conf.d/domain.com/au.conf - blank vhost
     
  10. eva2000

    eva2000 Administrator Staff Member

    30,947
    6,915
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,413
    Local Time:
    2:32 PM
    Nginx 1.13.x
    MariaDB 5.5
    limitations of current system is menu 22 is for domains or subdomains only NOT for subdirectory installs
     
  11. Matt Williams

    Matt Williams WordPress Fanatic

    468
    90
    28
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +135
    Local Time:
    11:32 PM
    latest
    10
    I did this once and went well but I used the manual SH code to do it.
     
  12. Matt Williams

    Matt Williams WordPress Fanatic

    468
    90
    28
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +135
    Local Time:
    11:32 PM
    latest
    10
    IS their a way to add a sub directory with full WP install successfully? or is this a full system limitation?
     
  13. eva2000

    eva2000 Administrator Staff Member

    30,947
    6,915
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,413
    Local Time:
    2:32 PM
    Nginx 1.13.x
    MariaDB 5.5
  14. Matt Williams

    Matt Williams WordPress Fanatic

    468
    90
    28
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +135
    Local Time:
    11:32 PM
    latest
    10
    Upon creating a new sub domain from menu option 22 - ( beta02 ) - it sets it up fine but when accessing sub.domain.com - it doesn't send me to the files located at
    Code:
    /home/nginx/domains/sub.domain.com/public
    It sends me to
    Code:
    /usr/local/nginx/html
    How to fix?
     
  15. eva2000

    eva2000 Administrator Staff Member

    30,947
    6,915
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,413
    Local Time:
    2:32 PM
    Nginx 1.13.x
    MariaDB 5.5
    what does your /usr/local/nginx/conf/conf.d/virtual.conf and /usr/local/nginx/conf/conf.d/sub.domain.com.conf contents look like ?
     
  16. Matt Williams

    Matt Williams WordPress Fanatic

    468
    90
    28
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +135
    Local Time:
    11:32 PM
    latest
    10
    sub.domain.com.conf

    Code:
    server {
    server_name sub.domain.com www.sub.domain.com;
    
    # 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;
    
    # limit_conn limit_per_ip 16;
    # ssi on;
    
    access_log /home/nginx/domains/sub.domain.com/log/access.log combined buffer=32k;
    error_log /home/nginx/domains/sub.domain.com/log/error.log;
    
    root /home/nginx/domains/sub.domain.com/public;
    
    include /usr/local/nginx/conf/wpsupercache_sub.domain.com.conf;
    
    location / {
    # Enables directory listings when index file not found
    #autoindex on;
    
    try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php?q=$uri&$args;
    
    }
    
    include /usr/local/nginx/conf/wpsecure_sub.domain.com.conf;
    include /usr/local/nginx/conf/php.conf;
    include /usr/local/nginx/conf/staticfiles.conf;
    include /usr/local/nginx/conf/drop.conf;
    #include /usr/local/nginx/conf/errorpage.conf;
    }
    
    Virtual.conf

    Code:
    server {
    #         listen   80;
                listen   80 default_server backlog=256;
                server_name ngx.domain.com;
                root   html;
    
            access_log              /var/log/nginx/localhost.access.log     main buffer=32k;
            error_log               /var/log/nginx/localhost.error.log      error;
    
    # 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;
    
    # limit_conn limit_per_ip 16;
    # ssi  on;
    
                location / {
    
    # block common exploits, sql injections etc
    #include /usr/local/nginx/conf/block.conf;
    
    #               Enables directory listings when index file not found
    #               autoindex  on;
    
    #               Shows file listing times as local time
    #               autoindex_localtime on;
    
    #               Enable for vBulletin usage WITHOUT vbSEO installed
    #               try_files               $uri $uri/ /index.php;
    
                }
    
            # example nginx-http-concat
            # /csstest/??one.css,two.css
            #location /csstest {
            #concat on;
            #concat_max_files 20;
            #}
    
    include /usr/local/nginx/conf/staticfiles.conf;
    include /usr/local/nginx/conf/php.conf;
    #include /usr/local/nginx/conf/phpstatus.conf;
    include /usr/local/nginx/conf/drop.conf;
    #include /usr/local/nginx/conf/errorpage.conf;
    
           }
    
     
  17. eva2000

    eva2000 Administrator Staff Member

    30,947
    6,915
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,413
    Local Time:
    2:32 PM
    Nginx 1.13.x
    MariaDB 5.5
    not seeing anything that is wrong there, only reason it would redirect to main hostname in virtual.conf is if sub.domain.com didn't properly resolve at DNS level
     
  18. Matt Williams

    Matt Williams WordPress Fanatic

    468
    90
    28
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +135
    Local Time:
    11:32 PM
    latest
    10
    That's the strange thing. I switched the DNS to CloudFlare, Created a new CNAME record for the sub domain and it still wants to point to
    /usr/local/nginx/html
     
  19. eva2000

    eva2000 Administrator Staff Member

    30,947
    6,915
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,413
    Local Time:
    2:32 PM
    Nginx 1.13.x
    MariaDB 5.5
    test the subdomain Global DNS Propagation Checker - What's My DNS? if domain.com and subdomain.com reside of different servers with differing IPs, then cname won't work, you'd need subdomain on A record to the server IP the subdomain is setup on.
     
  20. Matt Williams

    Matt Williams WordPress Fanatic

    468
    90
    28
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +135
    Local Time:
    11:32 PM
    latest
    10
    I just changed it to an A record