Saturday, 1 February 2014

How-to: Install Wordpress on Debian 7 Part 1


This is a standard Wordpress install for many Linux servers; I've used it on Ubuntu Server, Debian, also Mint and Lubuntu.

The description below is largely taken from the detailed instructions for installing Wordpress over at the Wordpress Codex. You could in confidence use the Famous Five Minute Install at the same place, but I prefer to step through manually and do it the long way to ensure everything is sound. I am not a server admin, and with my limited expertise, I'm not into 'short-cuts' that I can break...


My version goes like this:
  • Download Wordpress. Unpack it, put it in the right plac
  • Create your Wordpress database in Mysql, and at least one user
  • Configure Wordpress to talk you your database
  • Run the Wordpress installer to complete set-up
Download and Extract
Download and unzip the WordPress package from http://wordpress.org/download/.

We're currently up to wordpress-3.8.1.tar.gz, which is the file you're looking for. Check for the latest version. It used to be called latest.tar.gz; fortunately Wordpress have stopped that as it was a plain dumb name - 'latest' what?

If you're installing to a remote server, you will either have to download locally, decompress it then FTP the files onto the server, or, if you have shell access to your web server you can download WordPress directly (this goes for virtual servers, too).

At the command line:
wget http://wordpress.org/wordpress-3.8.1.tar.gz

Then extract the contents using:
tar -xzvf wordpress-3.8.1.tar.gz

This will extract the Wordpress into a folder called wordpress in the same folder as wordpress-3.8.1.tar.gz, unless you cd into a different folder or specify a different destination folder. Refer to the man page for the tar command syntax. I usually extract it straight into my /var/www/ folder.

Create the Database and a User
Many hosting providers will set-up Wordpress databases or even the whole application as part of your hosting package. If you're the independent kind doing this from scratch, you'll need to create one manually.

Having installed MySQL as part of the server stack, you can user the MySQL client, or cpanel or, as I prefer, phpMyAdmin, a useful server utility that saves me typing SQL commands.

If you have a database in use already, you can still install WordPress in it, making sure to prefix the Wordpress tables clearly to avoid over-writing any existing database tables.

The phpMyAdmin user interface can vary slightly between versions, but the content is always the same.

Create a Wordpress database if there isn't one already - check the Database dropdown on the left,

Choose a name for your WordPress database, choose something clear and distinctive and memorable (wp_data works for me) enter it in the Create new database field, and select Create.

Select the Home icon in the upper left to return to the main page, then select Privileges. If a user relating to WordPress does not already exist in the list of users, create one: select Add a new User.

Choose a username for WordPress ('wp_user' is my default). Just don't call everything in here 'wordpress' it's too confusing down the road. Enter it in the User name field (make sure Use text field: is selected from the dropdown.

Enter a strong password (ideally containing a combination of upper- and lower-case letters, numbers, and symbols), in the Password field  (make sure Use text field: is selected from the dropdown.) Re-enter the password in the Confirm Password field.

If you think you won't remember them write them down somewhere safe - not on a post-it note stuck to your monitor.

Leave all options under Global privileges at their defaults.

Select Go.

Return to the Privileges screen and select the Check privileges icon on the user you've just created for WordPress.

In the Database-specific privileges section, select the database you've just created for WordPress under 'Add privileges to the following database dropdown.' The page will refresh with privileges for that database.

Select Check All to select all privileges, and select Go.

On the resulting page, make note of the host name listed after Server: at the top of the page. (This will default to localhost if you haven't already specifed something else).


Ok, that's all the 'backend' work done. In part 2 we move on to the Wordpress 'front-end' set-up. RC

Related: How to Install the LaMp stack on Debian 7

1 comment:

  1. Installing Debian 8 Jessie in VMware Workstation Video Tutorial
    http://bit.ly/1KgTLv9

    ReplyDelete

At least try to be nice, it won't kill you...