For themes you can use register_theme_directory()
function to add additional directories for WP to be aware of. I don’t think I ever seen this used in practice, so not sure if there are any complications possible.
For plugins you can define WP_PLUGIN_DIR
and WP_PLUGIN_URL
constants in wp-config.php
.