dumbusername
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Themes missing in Admin PanelI found the cause and the fix (with lots of help from dalkinn’s notes above — thanks dalkinn for posting your followup)
I’m assuming the yum install is like the debian install which does something like this:
The local wp-config.php file for the blog is a symlink to /etc/wordpress/wp-config.php which makes it easier to host multiple WP blogs on the same server. The contents of the /etc/wordpress/wp-config.php looks like this:
require_once('/etc/wordpress/config-'.strtolower($_SERVER['HTTP_HOST']).'.php'); define('ABSPATH', '/usr/share/wordpress/'); require_once(ABSPATH.'wp-settings.php');
The WP themes are not listed in the design gallery if they are not installed under the ABSPATH, but for that to work the ABSPATH also has to be same as the DocumentRoot path in the Apache conf of that host. So I edited the ABSPATH in /etc/wordpress/wp-config.php file like so:
require_once('/etc/wordpress/config-'.strtolower($_SERVER['HTTP_HOST']).'.php'); define('ABSPATH', '/var/www/'.strtolower($_SERVER['HTTP_HOST']).'/'); require_once(ABSPATH.'wp-settings.php');
…and lo’ behold the themes now appear in the design themes gallery.
Note that for consistency sake I install each WP blog under /var/www/host.domain.com where “host.domain.com” is also the actual address of the blog as well as the name of its /etc/wordpress/config- file. This setup makes it easier to have multiple blogs on same server.