Blog Chowder

a sciences-ish "oddessa"

Ubuntu – WP install it

Recently, I’ve been asked to give a brief overview of how to install WP (WordPress), the blogging and CMS software, on a test machine. The idea is to try out new themes & plugins, before putting them live on a production server. As it’s my comfort zone, we’ll be using linux because it’s free and transparent, (sort of).

Since the WP installation is intended merely for testing, and not as a production site, there’s no need for uploading it ‘live’ onto the Internet. Instead, we’ll have it running on a single computer — in this case, a desktop or laptop. The computer, which will run our WordPress installation, will be called our localhost. The following 3½ steps lay out my preferred method for setting up the localhost.

STEP 1
First, find a junky old computer you’re willing to sacrifice as a WP testing environment. Fortunately, most of my friends have plenty of relic desktops — so it’s no problem for them.

STEP 2
Then, set up said computer as your WP localhost. Here a few basics on doing that:

  1. Download the ubuntu linux desktop installer. You’ll want to navigate here and download the most recent ubuntu LTS (Long Term Support) release
  2. Install ubuntu LTS and any security patches on your relic. A working Internet connection facilitates this process
  3. Get comfortable with linux (if necessary). Definitely know what the words “sudo”, “root” and “admin user” mean, before moving forward
  4. Follow the directions on this page which accord with your ubuntu release version, (or nearest applicable version)

Theoretically, you now will have installed a fairly recent version of WordPress, accessible at the following url:

http://localhost/wordpress/

STEP 3
You may (but not necessarily) need to make some final configuration changes, for which I would recommend referencing the main WordPress site. Again, that WP installation will be accessible from your local testing computer, but nowhere else. However, this page may call for you to supply some additional information.

Note that you will have had to install mysql at some point in your installation (record your mysql root user’s password!). The advantage of using the ubuntu package manager to install your WordPress version is that you can easily wipe/re-install all the dependencies.

STEP 3½
Should you wipe/re-install WP, you’ll need to take one extra step to get everything working again. You might choose to do this, for example, if you’ve hacked core code, or something has gone awry with your Apache install.

The simplest way to get your re-install working agian is to wipe “wordpress” database. To do this, you need your mysql root password:


gears@erie-laptop:/etc$ mysql -p -u root
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 261
Server version: 5.1.54-1ubuntu4 (Ubuntu)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved...

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| phpmyadmin         |
| wordpress          |
+--------------------+
4 rows in set (0.26 sec)

mysql> drop database wordpress;
Query OK, 35 rows affected (2.25 sec)

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| phpmyadmin         |
+--------------------+
3 rows in set (0.00 sec)

mysql> quit;

That’s all, folks!

Oh — also, I’ve had best success with “chmod -R” my /wordpress directory and using command line, or ubuntu’s windows manager, and installing the new themes & plugins directly to their respective directories.

Comments are closed.