Monthly Archives: May 2017

Install WordPress on a user account as root

You don’t have Softaculous on your server and a user asks you to install WordPress for him.
You can download the WordPress zip, unzip the archive, upload the files via FTP to the user account. You will also need to log in to cPanel and create the database and username.

We will show you an alternative way to install WordPress. We will install WordPress for user “plothost”.

  1. Login as root via SSH on your web hosting server.
  2. Change location to where you want to install WordPress
    root@web [~]# cd /home/plothost/public_html/
    root@web [/home/plothost/public_html]#
    
  3. Download the latest WordPress version. The permanent link is https://wordpress.org/latest.zip
    root@web [/home/plothost/public_html]# wget https://wordpress.org/latest.zip
    --2017-05-01 08:14:59--  https://wordpress.org/latest.zip
    Resolving wordpress.org (wordpress.org)... 66.155.40.249, 66.155.40.250
    Connecting to wordpress.org (wordpress.org)|66.155.40.249|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 8756989 (8.4M) [application/zip]
    Saving to: 'latest.zip'
    
    100%[==============================================================================================================================>] 8,756,989   7.07MB/s   in 1.2s
    
    2017-05-01 08:15:01 (7.07 MB/s) - 'latest.zip' saved [8756989/8756989]
    
    root@web [/home/plothost/public_html]#
    
    
  4.  Extract the archive-zip file in the current directory.
    root@web [/home/plothost/public_html]# unzip latest.zip -d .
    

    The zip archive will be extracted to public_html/plothost/wordpress/

  5. We want to install WordPress in public_html/ folder. So let’s move the files.
    root@web [/home/plothost/public_html]# mv ./wordpress/* .
    

    We now have all the WordPress files in /plothost/public_html/

  6. We should create the database and assign the username
    root@web [/home/plothost/public_html]# mysql
    Welcome to the MariaDB monitor.  Commands end with ; or \g.
    Your MariaDB connection id is 384766
    Server version: 10.1.22-MariaDB MariaDB Server
    
    Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    MariaDB [(none)]> CREATE DATABASE wpbase;
    Query OK, 1 row affected (0.00 sec)
    
    MariaDB [(none)]> CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'pass123456';
    Query OK, 0 rows affected (0.19 sec)
    
    MariaDB [(none)]> GRANT ALL ON wpbase.* TO 'wpuser'@'localhost';
    Query OK, 0 rows affected (0.02 sec)
    
    MariaDB [(none)]>
    
  7. We rename the configuration file wp-config-sample.php to wp-config.php
    root@web [/home/plothost/public_html]# mv wp-config-sample.php wp-config.php
    root@web [/home/plothost/public_html]#
    
  8. Edit the file wp-config.php in your preferred editor (like vi). Modify the lines with the WordPress details you’ve used earlier:

    /** The name of the database for WordPress */
    define(‘DB_NAME’, ‘database_name_here’);

    /** MySQL database username */
    define(‘DB_USER’, ‘username_here’);

    /** MySQL database password */
    define(‘DB_PASSWORD’, ‘password_here’);

    becomes

    /** The name of the database for WordPress */
    define(‘DB_NAME’, ‘wpbase’);

    /** MySQL database username */
    define(‘DB_USER’, ‘wpuser’);

    /** MySQL database password */
    define(‘DB_PASSWORD’, ‘pass123456’);

  9. We are almost finished. Let’s change the files’ user/group, so the user can modify the files.
    root@web [/home/plothost/public_html]# chown -R plothost:plothost .
    
  10. You can now give the installation URL to the user, and he/she will finish the installation by entering Site Title, Admin Username and Password, Email. (as in the image below)

WordPress Install Options

On our web hosting plans you can install WordPress easily via Softaculous. Check out the WordPress Hosting page.

Share this post:

Configure security questions for WHM login

For enhanced login security to Web Host Manager(WHM), you can setup security questions.

1.Go to WHM->Security Center->Security Questions

2. Click the Edit Questions and Answers button to set up the questions and answers.

WHM Security Questions QA

Please notice that you can’t use one, two or three questions. You must use all four questions and answers.
Each answer/question must be at least 2 characters long.

The predefined security questions are:

What is your primary frequent flyer number?
What is your library card number?
What was your first phone number?
What was your first teacher’s name?
What is your father’s middle name?
In what city was your high school?
What was the name of your first boyfriend or girlfriend?
What is your maternal grandfather’s first name?
What is your maternal grandmother’s first name?
In what city were you born (Enter full name of city only)?
What was the name of your first pet?
What was your high school mascot?
How old were you at your wedding (Enter age as digits)?
In what year (YYYY) did you graduate from high school?
In what city did you honeymoon (Enter full name of city only)?
What is the first name of the best man/maid of honor at your wedding?
What is your mother’s middle name?
In what city were you married?
In what city is your vacation home?
What is the first name of your first child?
What is your paternal grandfather’s first name?
What is your paternal grandmother’s first name?
What is the name of your first employer?
When is your wedding anniversary (Enter the full name of month)?
What is the first name of the best man/maid of honor at your wedding?
In what city was your mother born (Enter full name of city only)?
In what city was your father born (Enter full name of city only)?

3. Click the Continue button. Your questions and answers will be saved.

4. Go to WHM->Security Center->Configure Security Policies and check the option Limit logins to verified IP addresses option. Click the Save button. WHM Security Questions Policy WHM will ask for security questions only when you connect from a new IP. Each IP from which you successfully signed in will be added to a list of Recognized IPs for “root”. You will not have to enter again the answers to the security questions.

5. From now on, after entering the correct username and password you will be asked for answers to the security questions. WHM Security Questions List

6.1 Entering the correct answers, you will see a message : You have answered your security questions correctly. WHM Security Questions Success

6.2 Entering the wrong answers, you will see a message : The system has registered a brute force attempt on security questions for the account “root”. As the message says, the cPHulk Brute Force Protection will be triggered (if it’s enabled). WHM Security Questions Fail

7. If you want to see the list of Recognized IPs go to WHM->Security Center ->Security Questions and lick the Add or Remove Recognized IP Addresses button.

WHM Security Questions IP Tool

If you forget your WHM security answers:

  1. Connect via SSH to your server as root
  2. Go to file /var/cpanel/cpanel.config. Edit the file.
  3. Change the line
    SecurityPolicy::SourceIPCheck=1

    to

    SecurityPolicy::SourceIPCheck=0
  4. Now run the command:
    /usr/local/cpanel/whostmgr/bin/whostmgr2 --updatetweaksettings
  5. You should be able to login again to WHM.

If you want to remove the security questions, just delete the file /var/cpanel/userhomes/cpanel/.cpanel/ securitypolicy/questions/root.json

Share this post:

How to create/delete subdomains in cPanel

With cPanel you can easily create subdomains. Subdomains will be like subdomain1.yourdomain.com. 

To create a subdomain in cPanel:

  1. Connect to your cPanel account
  2. Go to Subdomains (DOMAINS section)
  3. Enter the:
    – Subdomain name
    Domain on which you want to create the subdomain
    Document Root – the folder on your account that will be used by the subdomain
  4. Click the Create button. The new subdomain will be created. You will see a message Success: “subdomain1.yourdomain.com” has been created.”
cPanel Subdomains
cPanel Subdomains

 

To create a subdomain in cPanel:

  1. Connect to your cPanel account
  2. Go to Subdomains (DOMAINS section)
  3. In the Modify a Subdomain section you will see all subdomains. Click the Remove button on the line with the subdomain you want to remove. 
  4. Confirm the action, by clicking the Delete Subdomain button. 
  5. The subdomain is deleted. You will see the confirmation message: 
    Success: The subdomain “subdomain1.yourdomain.com” has been successfully removed.”

The how-to video:

Your subdomain will not be available immediately in web browsers. Some time is needed for the DNS to propagate.
Share this post:
Page 7 of 7
1 5 6 7