Install WordPress on your HCS account

Tagged:

This tutorial is for installing WordPress to power your entire website. You should modify the instructions accordingly if you wish to install WordPress in a subdirectory (in particular, don't remove your existing web directory and extract WordPress to web/wordpress or some other directory).

Before you install WordPress, you will need a MySQL database. If you requested one when your account was created, you can find its password in an email that was sent to your group account's inbox. If you do not have an account, please request one by emailing help@hcs.harvard.edu.

  1. First, you should SSH to your account. See http://www.hcs.harvard.edu/tutorials/login if you haven't done this before.
  2. Make sure you are in your home directory. If you're not sure, just run
    cd ~
  3. If you don't have a website that you want to keep on your account, run
    rm -rf web
    to make sure that this will be a clean setup. If you want to back up the website you have currently, instead run
    mv web web.old
  4. Run these commands:
    wget http://wordpress.org/latest.tar.gz
    tar -xzvf latest.tar.gz
    mv wordpress web
    cd web
    mv wp-config-sample.php wp-config.php
    nano wp-config.php
  5. Now you're editing wp-config.php. Find the relevant lines and change them to:
    define('DB_NAME', 'account');
    define('DB_USER', 'account');
    define('DB_PASSWORD', 'passwd');
    define('DB_HOST', 'mysql.hcs.harvard.edu');

    replacing account with your group account name and passwd with your MySQL password.
  6. Hit ctrl-x to quit, and make sure you type 'y' to save your changes.
  7. Run fixwebfiles to fix the permissions of your files so they appear on the web.
  8. Now navigate to: http://www.hcs.harvard.edu/~account/wp-admin/install.php (replacing account with your account name) and follow the instructions.

Please let us know if you have any questions or problems with these instructions by emailing help@hcs.harvard.edu.