| CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
I cannot get wp-cli to find my plugin or theme directories the way I've structured wordpress files (relative to webserver root)
index.php: (copied from WordPress install with path modified to send it to the subdirectory)
<?php
/* Short and sweet */
define('WP_USE_THEMES', true);
require('./wordpress/wp-blog-header.php');
?>
wordpress/ -->> Wordpress install as downloaded, no edited files
wp-content/ -->> MY plugins and themes under this
wp-config.php: (relevant excerpt below)
if ($_SERVER['DOCUMENT_ROOT'] == "")
$_SERVER['DOCUMENT_ROOT'] = dirname(__FILE__);
define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/wp-content' );
Note: I added the first two lines in an attempt to work around this problem. My blog behaves well on both my production web host and my local test install (MAMP) without it.
In my database, the blog location settings point to example.com and WordPress location settings point to example.com/wordpress
wp plugin path should output:
/path/to/public_html/wp-content/plugins
Instead it outputs:
/path/to/public_html/wordpress/wp-content/plugins
wp plugin list shows me Hello Dolly and Akismet from the default wordpress file structure, instead of all the plugins I've got installed on my blog