WordPress installation notes

So I did something more or less like this to install wordpress. It didn’t go as smoothly as it could have. I’m not really sure if all these steps are necessary.

sudo apt-get install wordpress
sudo ln -s /usr/share/wordpress /var/www/wordpress
sudo apt-get install mysql-server-core-5.1
sudo apt-get install mysql-server-5.1
sudo bash /usr/share/doc/wordpress/examples/setup-mysql -n wordpress localhost

I also restarted apache a couple times:
sudo /etc/init.d/apache2 restart

and I added this line to bottom of the apache configuration file:
AddType application/x-httpd-php .html

Here’s the apache configuration file:
/etc/apache2/apache2.conf

Problems:
I’m stil having some problem since I can’t view the site. Going here:
http://localhost/wordpress

firefox asks what to do with the file. 🙁

Follow up:
I changed the owner and group of the entire wordpress directory. Don’t do this on a real server. I’m just using localhost.
sudo chown -R www-data:www-data wordpress/

I enabled a couple modules:
sudo a2enmod rewrite
sudo a2enmod proxy

You can see which modules are enabled and available by looking in these directories:
/etc/apache2/mods-enabled/
/etc/apache2/mods-available/

I edited these config files:
/etc/apache2/sites-enabled/000-default
/var/www/wordpress/.htaccess

To .htaccess I added these lines:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
DirectoryIndex index.php

In 000-default I commented out “AllowOverride None” in these two sections:

<Directory />

<Directory /var/www/>

Now going to /localhost/wordpress works fine.  I can see the blog.  The non-default (mod rewrite) permalinks are working as well.  Additionally I installed the xpost plugin on both localhost and the web site so that the two versions are kept in sync.  It works when I write posts on the local machine while connected to the internet.  The trick will be what happens when I’m not connected to the internet.

Additional notes:

another way to restart apache:
sudo apache2ctl restart

other apache2 config files:
/etc/apache2/httpd.conf but this one is empty
/etc/apache2/apache2.conf and I don’t think I edited this one

Oh, and look, I can embed photos from my flickr account as well (or anyone else’s flickr account  for that matter):

DSCN2911 by bryandkeith on flickr

Zane put together a script called flickrset2post to post all photos from a flickr album with their titles and descriptions.  I haven’t used it yet, but I think the syntax is:

where nnn is the flickr id for the set.

This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

One Response to WordPress installation notes

  1. Lisa says:

    I just read that it’s been 20 years since you owned a car… I am so, totally impressed. And then I realized that I was the reason it was 20 years ago…. said to my mom, who I am currently visiting “and that car was the stationwagon I crashed on Highway 36 on ice”…. thanks to me you have never owned a car again!!! 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.