HOW CAN WE HELP YOU TODAY?

1
Knowledgebase: VPS Hosting
Installing Wordpress on VPS or Dedicated server without a control panel
Posted by Noble M on 30 June 2014 08:18 AM

If you’ve got VPS or a Dedicated server without a control panel and would like to install WordPress on it, you can do it easily. We’ll break it down for you.

Step 1 : Create a Database & its User

  1. To do it, access your hosting server using SSH (Click here know how)

  2. Type in these commands one by one and hit Enter:

     

    mysql
    create database database_name;
    grant all privileges on database_name.* to [email protected] identified by 'database_user_password';
    flush privileges;
    quit

In the above screen, we’ve demonstrated an example for this, where:

  • demobigo_wp >> database name


Step 2 : Download Wordpress

You can do this in 2 ways:

  1. Upload the WordPress contents to your server via FTP

  2. Directly download the files on the server via SSH

In this article, we’ll show you the easiest and fastest way i.e using SSH. So lets begin:

  1. Access your hosting server using SSH (Click here know how)

  2. Move to the website root directory of your domain.
    For example, if your website root directory is /home/demobigo/public_html.
    Type in this command one by one and hit Enter:
    # cd /home/demobigo/public_html

  3. Now to download wordpress to your server, type in the following commands one by one & hit Enter     

# wget http://wordpress.org/latest.tar.gz

# tar -xzf latest.tar.gz

This will result in wordPress to be extracted in a folder called wordpress inside /home/demobigo/public_html (Considering this directory to be your website root directory)

You can install wordpress on the main domain (yourdomain.com) or even in a sub-directory (yourdomain.com/blog)

If you’d like it on the main domain, you can just move the files from the directory "/home/demobigo/public_html/wordpress" to "/home/demobigo/public_html/"

You can do this easily by running the following command lines one-by-one

  • # cd /home/demobigo/public_html/wordpress

  • # mv ./* /home/demobigo/public_html/

If you’d like it on a sub-directory say blog, just create a folder named blog and move the files to it similarly

 

Step 3: Edit WordPress configuration file

Now you can either create and edit the wp-config.php file manually, or just skip it & let wordpress do the configuration itselfwhen you run the installation script.

If you’d like to configure this:

  1. Rename the file wp-config-sample.php as wp-config.php
    To do this, run the following command in the directory you installed wordpress:

    # mv wp-config-sample.php wp-config.php
  1. Open the file "wp-config.php" using "vi" editor.
    To do this, run the following command in the directory you installed wordpress:

    # vi wp-config.php

Edit the following fields by replacing the actual database details.

  • DB_NAME

  • DB_USER

  • DB_PASSWORD

  • DB_HOST

Finally, the database section should look like below.

Screenshot_4.png

Now, you’re almost done.

Steps 4 : Run the installation script:

  • If you have installed WordPress on the main domain, just visit: http://domain.com/wp-admin/install.php

  • If you have installed WordPress in a folder say blog, just visit: http://domain.com/blog/wp-admin/install.php

  • Fill the Site Title, Username, password & other fields and click Install WordPress.

In case WordPress isn’t able to identify your custom saved wp-config.php file, it’ll tell you and offer to create and edit the file itself. You can just enter the database details that you’d like for the wordpress database and it will store the same in a new wp-config.php file.

 

That’s it. You’re all good to use wordpress on your server.

 

(2 vote(s))
This article was helpful
This article was not helpful