Multisite – Keep users logged in only to their site

As far as I remember the users in multisite are shared. They are tracked in one database table and use same cookie for authentication. The more practical approach is to track not merely login status, but capabilities. Users should be exposed to actions/information that they can perform/see, according to their Role on specific site. You … Read more

Best way to develop multisite and deploy on another server?

I always develop the webiste locally on my machine with the setup mydomain.dev and using svn or git to save versions of the code. The next step is to put it on a test domain like stage.mydomain.com and after that mydomain.com I use this to change the url:s in the database: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ Its a search … Read more

Wildcard subdomain for the same site

In WordPress you can easily do this with sub-directories like example.com/user1 Sub-domain & URL Strategy Having username.domain.com will prevent you in the future from having your own sub-domains like shop.example.com and will plague you if you wanted to use www.example.com or just http://example.com Finally … what if some user wants to use expletives or special … Read more

How to individually set WP_DEBUG on a sub-directory multisite?

You can do this by adding some code to wp-config.php $request_uri = $_SERVER[‘REQUEST_URI’]; $debug_dirs = array (‘/debug-dir1/’,’/debug-dir2/’); // list of directories to turn on debugging foreach ($debug_dirs as $debug_dir) { if (!strncmp($request_uri,$debug_dir,strlen($debug_dir))) { define(‘WP_DEBUG’, true); } } define(‘WP_DEBUG’, false); // debug off by default

WP-Admin not working properly at WordPress multisite with subdirectories

If you installed WordPress Multisite starting with version 3.0 to 3.4.2, you’ve got the correct .htaccess file contents. However, if you started with a newer version (3.5 or higher)—and I’m assuming you did, if you’ve just installed WordPress Multisite recently—your .htaccess file should look like this: RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] # … Read more

What is the best way to load the WP environment in a subdomain of my multisite WordPress install?

Use the defines to make it pick the site you want it to pick. You can define these four to setup the $current_site values properly: DOMAIN_CURRENT_SITE, PATH_CURRENT_SITE, SITE_ID_CURRENT_SITE, BLOG_ID_CURRENT_SITE. If you check the wpmu_current_site() function in ms-load.php, you’ll see that it uses those to create the $current_site global. You may or may not have to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)