Saturday, January 03, 2009

Wordpress starting to take shape.

Still quite a way to go, but certainly made some progress.
Interestingly, the progress I made resulted chiefly from removing the complications in the guides I was using (this and this). So, in step-by-step format, here's what I did:
1. Install Lamp-Server with

sudo tasksel install lamp-server

Note that sometimes I found this command getting stuck at 79% on the progress bar. If it is truly stuck, the CPU usage will be close to zero instead of close to 100% if it is actually working.
If it does stick, I always removed everything as explained here and then tried it again.
2. To avoid the Could not determine the server's fully qualified domain name, error, do this in a terminal:
echo "ServerName localhost" | sudo tee /etc/apache2/conf.d/fqdn

3. To test your site (which is at /var/www, type this
# echo 'Hello! It is working!' > /var/www/index.html

Note that this command only seems to work as # and not as sudo.
4. Now create a database and a user in MySQL with these commands
mysql -u root -p

mysql> CREATE DATABASE database1;

mysql> GRANT ALL PRIVILEGES ON *.* TO 'paul'@'localhost' IDENTIFIED BY '***password***' WITH GRANT OPTION;

mysql> \q

5. Edit the apache2 settings with
sudo gedit /etc/apache2/apache2.conf

and then change lines 119 and 122 as I mentioned yesterday.
6. Install wordpress from the Ubuntu repos with
sudo apt-get install wordpress php5-gd

7. Now install wordpress to the default website with
sudo ln -s /usr/share/wordpress /var/www/wordpress

sudo bash /usr/share/doc/wordpress/examples/setup-mysql -n paul localhost

8. Finally, restart apache2 with
sudo /etc/init.d/apache2 restart

9. Now browse to http://localhost/wordpress which actually brings you to http://localhost/wordpress/wp-admin/install-php
In my case, I found this always gave an error about /localhost/wordpress not existing. However, just eliminating the final directory (/install-php) immediately put everything to rights. I don't at all understand this and don't see it mentioned anywhere, but, what the heck, it works.
10. Now, click on the Install Wordpress button and wait..........In my case, this worked without problem.
Finally, I was using wordpress (WP) but only on a local server.
The next stage will be to get somebody to host my blog, preferably for free,

No comments:

Post a Comment