26 September, 2015

WordPress on Debian - where are the files?

You can install WordPress on a Debian system. Follow the instructions here. This install will make a WordPress site available on your localhost, but the files are not found here.

# var/www/html/

Actually they are saved in a number of different directories. First the virtual host is defined in apache:

# /etc/apache2/sites-available/wp.conf

Alias /wp/wp-content /var/lib/wordpress/wp-content
        Alias /wp /usr/share/wordpress
        
            Options FollowSymLinks
            AllowOverride Limit Options FileInfo
            DirectoryIndex index.php
            Require all granted
        
        
            Options FollowSymLinks
            Require all granted
        
 These aliases tell Linux where to find the different WordPress files.

Here are the configuration files:

# /etc/wordpress

Here you find the config-localhost.php file. In this file you set up the database connection:

define('DB_NAME', 'wordpress');
define('DB_USER', 'wordpress');
define('DB_PASSWORD', '*******');
define('DB_HOST', 'localhost');
define('WP_CONTENT_DIR', '/var/lib/wordpress/wp-content');
?>


Here are the actual WordPress files:

# /var/lib/wordpress/

The WordPress themes and plugins etc. are here:

# /usr/share/wordpress/wp-content

No comments: