Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old August 4th, 2006   #1
VirtuAlex
Ubuntu Extra Shot
 
VirtuAlex's Avatar
 
Join Date: Jun 2006
Location: Houston, TX
Beans: 366
Ubuntu 6.06
HOWTO: Wordpress from repositories

Wordpress from repositories howto

(!!! WARNING !!! This is "beta version". Please provide any feedback, wether it is working for you or not)

Introduction

It seems that many people are trying to install wordpress package from repos and expect it to work right away. In ideal world it should walk you through, or at least point you in the right direction. It is not the case though. You have to configure it yourself.

First let me note that you can install wordpress from source right into www root and have no troubles. However, in that case you have to do the updates the same way each time there is new version. On the other hand, the package from reops will be getting updates automatically, as it meant to be. If you want it this way, let's proceed.

Installation and Configuration

Install the wordpress package with
Code:
sudo apt-get install wordpress
or using your favorite method. Anybody could do that but not everybody know what to do next. That is the purpose of this howto.

The list of installed files you can see in the package properties in Synaptic (anybody knows how to do it from command line?):

/etc/wordpress/ - configuration files
/usr/share/wordpress/ - all the php code
/usr/share/doc/wordpress/ - documentation, you're welcome to study it

You may now want to read through /usr/share/doc/wordpress/README.Debian. It pretty much explains your options.

Next you want to connect /usr/share/wordpress to your www root. Some examples are in /usr/share/doc/wordpress/examples/apache.conf, so feel free to experiment. If you have no idea what you're doing, you may still proceed, but first check if your apache is functioning by typing http://localhost in your favorite web browser. If it is not then fix it or fix your firewall. Then make a backup your apache2.conf with
Code:
sudo cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf.bak
run
Code:
gksudo gedit /etc/apache2/apache2.conf
and paste the following block of code (it is just one of examples) somewhere. A good place is somewhere close to where Alias /icons is defined the similar way as we will define Alias /blog.
Code:
########## Without using Virtual host, hosted off /blog

Alias /blog /usr/share/wordpress
<Directory /usr/share/wordpress>
  Options FollowSymLinks
  AllowOverride Limit Options FileInfo
  DirectoryIndex index.php
</Directory>
Save it and restart apache. If you're clueless just reboot. You should be able now to get some php error messages when you go to http://localhost/blog in the web browser.

Now you are ready to run the configuration script to make a database and set up connection with something like
Code:
sudo sh /usr/share/doc/wordpress/examples/setup-mysql -n wordpress blog.example.com
where wordpress will be username and the database name at the same time and blog.example.com you should replace with your virtual host name or just localhost for our example. The script would complain that
Code:
ln: creating symbolic link `/srv/www/localhost' to `/usr/share/wordpress': No such file or directory
because it expects to find your virtual host at /srv/www/ but it is okay for our example cause we did not set up any virtual hosts.

Finally go to http://localhost/blog (or your virtual host) and wordpress will walk you through the rest of the setup.

Sort of Disclaimer

This howto is not meant to be guide to apache web server, or php, or mysql, or even guide to using wordpress. It is just guide to wordpress package as it functions in Ubuntu Dapper Drake 6.06. It may or may not work in older systems. If you have found any bugs or you want to contribute to this howto in any other way, you're welcome to post in this thread.
VirtuAlex is offline   Reply With Quote
Old November 14th, 2006   #2
timsan775
First Cup of Ubuntu
 
Join Date: Nov 2006
Beans: 3
Re: HOWTO: Wordpress from repositories

can the debian wordpress also do multi-logins?

how can any multi-login wordpress be enabled on dapper/edgy?
timsan775 is offline   Reply With Quote
Old April 12th, 2007   #3
adamantivm
5 Cups of Ubuntu
 
Join Date: Sep 2006
Beans: 33
Re: HOWTO: Wordpress from repositories

I just successfully followed this how-to on an i386 Edgy - thank you!!

Just wanted to report that in the step where you say:

Quote:
sudo sh /usr/share/doc/wordpress/examples/setup-mysql -n wordpress blog.example.com
I had to specify bash as the interpreter instead:
Quote:
sudo bash /usr/share/doc/wordpress/examples/setup-mysql -n wordpress blog.example.com
adamantivm is offline   Reply With Quote
Old November 27th, 2007   #4
andhar
5 Cups of Ubuntu
 
andhar's Avatar
 
Join Date: Oct 2007
Location: Newburgh, NY
My beans are hidden!
Ubuntu 7.04 Feisty Fawn
Re: HOWTO: Wordpress from repositories

still works! thankyou.
I also had to specify bash as the interpreter.
__________________
Check Out my Blog
andhar is offline   Reply With Quote
Old May 16th, 2010   #5
utlanh
First Cup of Ubuntu
 
Join Date: May 2010
Beans: 1
Re: HOWTO: Wordpress from repositories

thanks for sharing.
utlanh is offline   Reply With Quote
Old 6 Days Ago   #6
catphive
First Cup of Ubuntu
 
Join Date: Jun 2007
Beans: 12
Re: HOWTO: Wordpress from repositories

I installed from the repository on a fresh ubuntu 10.04 install, and can't get this to work quite right. I think something has broken...

The setup script tries to create an url of this form for some bizarre reason:

http://example.com/example.com

It creates a symlink from /var/www/example.com to /usr/share/wordpress

This works, but of course I don't want that URL. However, if I create a symlink from /var/www/blog to /usr/share/wordpress, or if I create an entry in my apache config file, it no longer runs index.php when I go to the URL!

Instead what happens is the index.php file itself downloads without being preprocessed... So something about reaching the index file via http://example.com/blog instead of http://example.com/example.com makes it fail to run the php.

What's even stranger is that the other php files, such as http://example.com/wp-login.php work *fine*. It's just he index.php that fails!

I don't remember running into this on earlier versions of Ubuntu... Maybe a new bug in the setup script or something? has anyone else had this trouble on Ubuntu 10.04?
catphive is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:11 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry