Install WordPress 2.8.4 on Ubuntu 9.04 Jaunty
Since we're using WordPress at work, I decided to install WordPress on my local machine for testing and educational purposes. Here are my notes. The versions of stuff are: WordPress 2.8.4, Ubuntu 9.04 Jaunty Jackalope, MySQL 5.1, PHP 5.2.6, Apache 2.2.11 with prefork mpm.
Install prerequisites
- Install Apache and PHP
sudo apt-get install php5 sudo apt-get install php5-mysql
- Install MySQL Server
sudo apt-get install mysql-server
Set a password for the MySQL root user when prompted.
Download Wordpress code
cd /var/www sudo wget http://wordpress.org/wordpress-2.8.4.tar.gz sudo tar zxvf wordpress-2.8.4.tar.gz
Create MySQL database and user
mysql -uroot -p
Enter the password you created above.
CREATE DATABASE wordpress; CREATE USER 'wp_user'@'localhost' IDENTIFIED BY 'wp_password'; GRANT ALL PRIVILEGES ON wordpress.* TO 'wp_user'@'localhost'; \q
Edit WordPress wp-config.php file
- Copy the sample file
cd /var/www/wordpress sudo cp wp-config-sample.php wp-config.php
- Edit the following lines in
/var/www/wordpress/wp-config.php/** The name of the database for WordPress */ define('DB_NAME', 'wordpress'); /** MySQL database username */ define('DB_USER', 'wp_user'); /** MySQL database password */ define('DB_PASSWORD', 'wp_password'); /** MySQL hostname */ define('DB_HOST', 'localhost');
Set up Apache virtual host
- Edit
/etc/apache2/sites-available/wordpressServerName localhost <VirtualHost *:80> DocumentRoot /var/www/wordpress ErrorLog /var/log/apache2/wordpress.error.log </VirtualHost> - Symlink to
sites-enabledsudo ln -s /etc/apache2/sites-available/wordpress /etc/apache2/sites-enabled/wordpress
- Remove default virtual host from
sites-enabledsudo rm /etc/apache2/sites-enabled/000-default
Restart Apache and view your Wordpress site
sudo /etc/init.d/apache2 restart
- Go to http://localhost in your browser. You should get the WordPress Welcome page.
References
4
Comments
—
Comments feed for this post
#2 Nikolay Kolev commented on 2010-05-17:
I recommend the following improvements:
-
Install LAMP via
sudo apt-get install lamp-server^ -
Do not delete the default website in apache, just do the following:
sudo a2dissite default -
There's no need to create the
wp-config.phpfile as WordPress will create it automatically -
The latest WordPress can be downloaded from http://wordpress.org/latest.tar.gz
-
Also, I recommend adding
Options -Indexes FollowSymLinksso that people cannot sniff what plugins you have installed, etc -
Symlink to sites-enabled should be done via
sudo a2ensite wordpress
#3 Nikolay Kolev commented on 2010-05-17:
One more thing, once you set up WordPress, you should go to https://api.wordpress.org/secret-key/1.1/ to generate unique secret keys, then, update your wp-config.php with those generated values.
Post a comment
About
I'm Eliot and this is my notepad for programming topics such as Python, Django, Ubuntu, Emacs, etc... more »
Search Blog
Tags
-
algorithms
(5)
-
aws
(9)
-
blogproject
(20)
-
c_cplusplus
(12)
-
cardstore
(8)
-
colinux
(2)
-
concurrency
(13)
-
conkeror
(2)
-
core
(2)
-
cygwin
(17)
-
datastructures
(14)
-
datetime
(4)
-
decorators
(4)
-
django
(40)
-
emacs
(22)
-
files_directories
(11)
-
git
(5)
-
hardware
(5)
-
install_setup
(8)
-
javascript
(3)
-
keyboard
(9)
-
matplotlib
(5)
-
mercurial
(4)
-
nginx
(2)
-
persistence
(5)
-
preferences
(7)
-
processes
(4)
-
pyqt
(18)
-
python
(144)
-
ratpoison
(3)
-
regexes
(6)
-
rsync
(3)
-
softwaretools
(17)
-
sql
(14)
-
ssh
(10)
-
subversion
(6)
-
twisted
(7)
-
ubuntu
(65)
-
urxvt
(5)
-
vxworks
(25)
-
webdev
(5)
-
wmii
(7)
Blogroll
- Adam Gomaa
- Alex Clemesha
- Amir Salihefendic
- Armin Ronacher
- David Beazley
- David Ziegler
- Duncan McGreggor
- Gareth Rushgrave
- Glyph Lefkowitz
- Guido van Rossum
- Ian Bicking
- Jacob Kaplan-Moss
- James Bennett
- James Tauber
- Jesper Noehr
- Marty Alchin
- Matt Harrison
- Nikolay Kolev
- Parand Darugar
- Peter Baumgartner
- Peter Bengtsson
- Rob Hudson
- Simon Willison
- Will McGugan
#1 Manuel Jose commented on 2009-11-17:
I got this error while restarting apache
Syntax error on line 161 of /etc/apache2/apache2.conf: Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration
any ideas? Thanks in advance :-)