Support » Installing WordPress » Debian Installation

  • Hi,

    I have a actual Debian installation (apt-get dist-upgrade today) and want to install wordpress.

    I get this error:

    Warning: main(/etc/wordpress/wp-settings.php): failed to open stream: No such file or directory in /etc/wordpress/wp-config.php on line 20

    Fatal error: main(): Failed opening required ‘/etc/wordpress/wp-settings.php’ (include_path=’.:/usr/share/php:/usr/share/pear’) in /etc/wordpress/wp-config.php on line 20

    I have no /usr/share/pear (php4-pear is installed).


    Alias /blog /usr/share/wordpress
    <Directory /usr/share/wordpress>
    Options FollowSymLinks
    AllowOverride Limit Options FileInfo
    DirectoryIndex index.php

    ########## Tips
    ### If permalinks or rewrite is not working you probably need:
    <Directory />
    Options FollowSymLinks
    AllowOverride All

    If i try to access:

    i got the error.

    I have no clue about PHP, Apache and so on.

    anyone have a hint for me?


Viewing 4 replies - 1 through 4 (of 4 total)
  • The /usr/share/doc/wordpress/DEBIAN.readme explains how to properly configure WordPress to work in Debian…

    You need to create a file called the php file with your SQL login information. This allows Debian the ability to host several blogs for different domains.

    use /usr/share/wordpress/wp-config-sample.php to help create this file, don’t forget to remove the duplicate entry as /etc/wordpress/wp-config.php already contains the stuff after the “stop editing here” section

    Hi, I hate to be one of the many many people with this same question, but I’ve reinstalled, read all the FAQs, and am tired of banging my head against the wall… this is what I did:

    1) On Ubuntu, used Synaptic to install WordPress 1.5. The default locations are /usr/share/wordpress, /usr/share/doc/wordpress, and /etc/wordpress.

    2) I already have php, mysql and apache2 running, so I just create the database “wordpress” and assign the permissions as per the documentation. The user is wordpress, the password is, let’s say, “smerk” (not the real one).

    3) I edit wp-config-sample.php with the following:

    // ** MySQL settings ** //
    define(‘DB_NAME’, ‘wordpress’); // The name of the database
    define(‘DB_USER’, ‘wordpress’); // Your MySQL username
    define(‘DB_PASSWORD’, ‘smerk’); // …and password
    define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value

    // Change the prefix if you want to have multiple blogs in a single database.
    $table_prefix = ‘wp_’; // example: ‘wp_’ or ‘b2’ or ‘mylogin_’

    // Change this to localize WordPress. A corresponding MO file for the
    // chosen language must be installed to wp-includes/languages.
    // For example, install to wp-includes/languages and set WPLANG to ‘de’
    // to enable German language support.
    define (‘WPLANG’, ”);

    /* Stop editing */

    define(‘ABSPATH’, dirname(__FILE__).’/’);

    And I copy this OVER wp-config.php in the /usr/share/wordpress directory. This file is symlinked to /etc/wordpress/wp-config.php.

    4) So far so good. The next step is the issue: I go to and I get the following error:

    Warning: main(/etc/wordpress/wp-settings.php) [function.main]: failed to open stream: No such file or directory in /etc/wordpress/wp-config.php on line 20

    Fatal error: main() [function.require]: Failed opening required ‘/etc/wordpress/wp-settings.php’ (include_path=’.:/usr/share/php:/usr/share/pear’) in /etc/wordpress/wp-config.php on line 20

    And I have no idea what to do next. I have followed the (scant) directions under /usr/share/doc/wordpress/README.Debian, all it says to do is to copy wp-config-sample.php to wp-config.php (which I have done) and to create a database in MySQL, which I have also done.

    Thank you so much for your help in advance, I really appreciate it.

    I installed WP 2 on my Debian without using deb package. Please see Hopefully giving you any useful information.

    😀 Thanks a bunch and Gud lak

    At the bottom of your /etc/wordpress/config-<site>.php change

    define(‘ABSPATH’, dirname(__FILE__).’/’);


    define(‘ABSPATH’, ‘/usr/share/wordpress/’);

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Debian Installation’ is closed to new replies.