Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

159 lines (121 sloc) 6.101 kb
== link:index.html[Index] -> link:cookbook.html[Cookbook]
///////////////////////////////////////////////////////////////////
Last checked:
* Cherokee 1.0.1
* WordPress 2.8.4
///////////////////////////////////////////////////////////////////
Cookbook: Setting up WordPress
------------------------------
Setting up link:http://wordpress.org/[WordPress] with Cherokee is
really easy. This recipe describes the WordPress 2.8.x installation,
which is the latest release at the time of writing.
There is a
link:http://www.cherokee-project.com/screencasts.html#wordpress[screencast]
available at the
link:http://www.cherokee-project.com/[Cherokee-Project website] to
demonstrate how easy it is to use the WordPress wizard.
image:media/images/screencast.png["WordPress wizard",
link="http://www.cherokee-project.com/screencasts.html#wordpress"]
There are two ways of installing WordPress: it can either be installed
as a new virtual server or be installed inside a directory of some of
the virtual servers that already exist.
[[cherokee_vserver]]
Setting up WordPress as a new Virtual Server
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The first step would be to go to the virtual server list page. Once in
there, click on the `Add` button at the top of the panel to show the
list of available wizards.
image::media/images/admin_vservers_wizard.png[Virtual Server Wizards]
Now, you will have to select the `CMS` category, and run the WordPress
wizard. At this stage the WordPress wizard will ask you for some
basic parameters about the installation. It will try to auto-fill as
many entries of the form as possible. For instance, if it finds
WordPress installed in a standard location it will use that path as
the default directory.
The new virtual server will be created after this form is submitted.
The virtual server configuration will cover the vast majority of the
cases. Most probably it will cover your needs, although you are free
to modify it as you will.
[[cherokee_dir]]
Setting up WordPress inside a Directory
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
WordPress can also be configured inside a directory. Let's suppose we
want to set up WordPress inside the `/blog` directory of one of our
virtual servers.
In this case, the first thing you will have to do is to enter the
virtual server configuration you'd like to configure WordPress
in. Visit the `Behavior` tab, use the `Rule Management` button and
click on the `Add` button at the top of the panel.
image::media/images/admin_vserver_wizard.png[Virtual Server Wizards]
As in the previous case, this wizard will ask some very basic
information, including the public web directory where WordPress will
be set up and the local WordPress source directory.
WARNING
^^^^^^^
Beware of the long time it gets WordPress to get through the
installation. It has been known to exceed the timeout that Cherokee
uses as default, and while this will still sometimes allow for a
complete installation, it will most probably cause a failure while
delivering the last page of the process. Since this is the page that
provides the random password needed to access the admin page of
WordPress, you installation will be useless.
If you encounter this problem, please increase your server's `timeout`
value, under the `Basic Behavior` paragraph of the `General` tab, and
start over.
If you are going to attempt to make an installation as is, with no
reconfiguration of Cherokee whatsoever, you can skip right to the
section link:cookbook_wordpress.html#setting_up_wordpress[Setting up
WordPress].
WARNING
^^^^^^^
Beware of another possible break point. The last step in the
installation of WordPress involves mailing the details of the new
account to the provided email. Normally the process will be painless:
if the system is running an MTA, this report will be sent. If not, it
will simply skip this step. In both cases the information will also be
displayed on screen. However, there is a corner case that might make
your installation fail: if the server is running a broken MTA, this
could make PHP fail when trying to deliver the email, in turn
resulting in a failure during the installation, and making Cherokee
report an `Error 500`. Having a broken MTA on a production server is a
very unlikely scenario, but double check your MTA in case you receive
this error.
[[wordpress]]
Setting up WordPress
~~~~~~~~~~~~~~~~~~~~
First download and uncompress the distributed WordPress release into
`/var/www/wordpress`, and create a database suitable for the installation.
Log in to MySQL:
----------------
mysql -u root -p
----------------
And create the database for WordPress. We will be using the name
'wp', the user 'wpuser' and the password 'wppassword', but
you should set up your own.
------------------------------------------------------------------------
CREATE DATABASE wp;
GRANT ALL PRIVILEGES ON wp.* TO wpuser@localhost IDENTIFIED BY 'wppassword';
GRANT ALL PRIVILEGES ON wp.* TO wpuser@localhost.localdomain IDENTIFIED BY 'wppassword';
FLUSH PRIVILEGES;
quit;
------------------------------------------------------------------------
Then point your web browser to `http://localhost` and follow the
instructions provided by the installer.
image::media/images/cookbook_wp1.png[WP installation]
And the installation will be automatic. Just fill up the
requested values and you will obtain the following results once your
are through.
image::media/images/cookbook_wp2.png[WP installation]
With that, you are done installing. Let's log in and make the last
adjustments.
image::media/images/cookbook_wp3.png[WP admin]
Once we're logged, we can configure the way `permalinks` are
displayed. Just use the `Settings`->`Permalinks` menu, and adjust the
way the links are to be rewritten.
image::media/images/cookbook_wp4.png[WP admin]
Remember to set up the plugins that are of interest for you, such as
the sitemap generator, in a fashion compatible with what you
configured in Cherokee.
And voilà! You have a WordPress installation working flawlessly with
Cherokee.
image::media/images/cookbook_wp5.png[WP in action]
Jump to Line
Something went wrong with that request. Please try again.