How to move theme directory but not plugins/uploads out of WordPress root directory?

http://codex.wordpress.org/Function_Reference/register_theme_directory /** * Register a directory that contains themes. * * @since 2.9.0 * * @param string $directory Either the full filesystem path to a theme folder or a folder within WP_CONTENT_DIR * @return bool */ function register_theme_directory( $directory ) You should be able to call register_theme_directory(‘/full/path/to/directory’) and thus add a new path full of … Read more

Some plugins adding full server path after url (with custom wp-content folder)

Given that the js location is determined as follows: $js_location = WPSEO_URL . ‘js/wp-seo-admin-global.js’ where: WPSEO_URL = WP_PLUGIN_URL . “https://wordpress.stackexchange.com/” . <WP_SEO_PLUGIN_PATH> . “https://wordpress.stackexchange.com/” I suspect the problem lies with the derivation of <WP_SEO_PLUGIN_PATH>. This value is determined by the code in the function plugins_url() found in wp-includes\link-template.php If you debug that function, it may … Read more

How do I set up Debugging?

I use a plugin for this issue. Even if debug is set to false, it still prints error to the screen in red. It is easy and fast to create the plugin. In your plugins folder in your wordpress install, create a new file and call it anything you like, for instance, debugger-plugin.php. Open up … Read more

Accessing two databases

You can easily set up another $wpdb object to access your other database. $mydb = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST); var_dump($mydb); That, of course, uses the default connection credentials but if you defined different constants and used those, is should work just fine. If this other database is not a WordPress database, you won’t have … Read more