Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to set up multiple WP installs in a few subdirectories. For example, one WP install would live at mydomain.com/blog. Another WP install might live at mydomain.com/project1 and another might live at mydomain.com/project2.

I'd like to enable single sign on so that I only have to issue one username and password for a user across these multiple WP installs. How might I accomplish this?

FYI...I've considered enabling MultiSite, but I decided against it for the following reason;

While permalinks will continue to work, the main blog (i.e. the first one created) will have an extra entry of blog, making your URLs appear like domain.com/blog/YYYY/MM/POSTNAME.

This is by design, in order to prevent collisions with SubFolder installs. Currently there is no easy way to change it, as doing so prevents WordPress from auto-detecting collisions between your main site and any subsites. This will be addressed, and customizable, in a future version of WordPress.

Thanks in advance for any assistance!

Eddie

share|improve this question

1 Answer 1

Let your blogs share the same user table. In your blogs wp-config.php files add:

define('CUSTOM_USER_TABLE', $table_prefix . 'my_users');
define('CUSTOM_USER_META_TABLE', $table_prefix . 'my_usermeta');

Important note from Codex:

Please note that permissions in the user_meta tables are stored with the table prefix of the site. So in the CUSTOM_USER_META_TABLE one must have entries for each site using that table. At the very least for the administrator, to avoid the "you do not have permissions error" you should have:

prefix1_capabilities = a:1:{s:13:"administrator";b:1;} and prefix2_capabilities = a:1:{s:13:"administrator";b:1;} etc
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.