WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I wanted to play with some Linux-only PHP performance tools and installed Ubuntu Server 10.10 in VirtualBox (for the record I have little clue about Linux, never used it extensively).

Turned out Ubuntu (Debian) has WordPress package that does some things differently then I am used to.

I was especially puzzled with this instead of usual wp-config.php:

$debian_server = preg_replace('/:.*/', "", $_SERVER['HTTP_HOST']);
$debian_server = preg_replace("/[^a-zA-Z0-9.\-]/", "", $debian_server);
$debian_file = '/etc/wordpress/config-'.strtolower($debian_server).'.php';

if (!file_exists($debian_file)) {
    header("HTTP/1.0 404 Not Found");
echo "<b>$debian_file</b> could not be found. The file is either not readable by this process or does not exist. <br>
    Please check if <b>$debian_file</b> exists and contains the right password/username.";


define('ABSPATH', '/usr/share/wordpress/');
define('WP_CORE_UPDATE', false);
define('WP_ALLOW_MULTISITE', true);


Why does it do stuff this way? Does it play well with multisite and WordPress in general? Do I understand right that I won't be able to update WordPress core of such install, other than by updating package?

share|improve this question
up vote 5 down vote accepted

The code you posted is to have multiple wp-config.php-style wordpress configuration files with one codebase. the configuration is then based on the domain name.

imagine the localserver is listening on http://localhost.localdomain/ (no idea which one is the default with ubuntu), then the configuration file would be: /etc/wordpress/config-localhost.localdomain.php.

This is made so that the wordpress package can be upgraded w/o overwriting your own configuration. So the reason why this is done is to have an easy upgrade path with the ubuntu package manager.

I assume this does not play well with multisite, but I have no clue. It should work flawlessly with normal wordpress usage.

As Thomas MacDonald already suggested, you can always go with a manual install. I would recommend that as well because you wrote that you run performance and analyse tools and I think you want to do this on the original package. So I assume that there is no need for you to rely on the pre-made ubuntu wordpress package. That's mainly for those who want to install it the "ubuntu way".

Good start for you with linux, it really rocks for development. I'm sure you will enjoy it once you figured all the new things out.

share|improve this answer
So basically this is one of pre-MS hacks to run several sites on one set of WP core... I think separate install would indeed make better test stack. – Rarst Oct 16 '10 at 9:10
@Rasts -- you might probably check if there is/was a wordpress-mu package available for multisite stuff. basically this is a decision made by the packager so it's easy to use wordpress with the package manager, e.g. for updates, w/o overwriting the users configuration. – hakre Oct 26 '10 at 9:15

By the looks of it loads the config file from the /etc/wordpress directory instead of from /usr/share/wordpress, where the package is installed by default, probably for security reasons.

I would recommend not using the package and instead installing WordPress as you would with any other installation - the setup it uses here could affect you later on - the package might not be updated, which would then make updating WP core more difficult.

share|improve this answer

I use Ubuntu for everything except testing layouts in Internet Explorer. Definitely go with a manual install rather than installing through the package manager. In my experience packages available through the package manager tend to be a bit behind the present release. Not a big deal if your installing Guaydeque to listen to your mp3's for example but not advisable for something that needs to be up-to-date 100%.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.