Rss Feed

lighttpd and WordPress

8 June 2011 by admin

By default, lighttpd will not support your WordPress installation and it won’t give you any information about why not. It’s a total pain but here’s how to get it up and running.

lighttpd.conf
Make sure “mod_fastcgi” is enabled in the server.modules section.
Make sure you have the following lines:

fastcgi.server = ( “.php” => ((
“bin-path” => “/usr/bin/php-cgi”,
“socket” => “/tmp/php.socket”,
“max-procs” => 2,
“bin-environment” => (
“PHP_FCGI_CHILDREN” => “16″,
“PHP_FCGI_MAX_REQUESTS” => “10000″
),
“bin-copy-environment” => (
“PATH”, “SHELL”, “USER”
),
“broken-scriptfilename” => “enable”
)))

You may need to change some things around for your environment. Restart lighttpd and make sure it’s still working.
Try reloading your WordPress site, for example and you’ll likely see Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
You can solve this one of a number of ways. I just ran sudo apt-get install php5-mysql.
Restart lighttpd.
Assuming you have the correct database credentials, you should now be good to go. :-) .


No Comments »

No comments yet.

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>