How To Change the URL of a WordPress Multisite

These are the .htacess rules that fixed it. RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ – [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] #RewriteRule ^(.+)?/(wp-.*) /$2 [L] RewriteRule ^(.*?)/(wp-.*) /$2 [L] RewriteRule . index.php [L]

New domain in multisite environment

This is exactly what multisite is for. It’s quite flexible and allows you to host multiple domains, sub-domains to various domains (or a single domain) or any combination of that. A common setup is to have a top level domain assigned to the network of sites (not absolutely required). I use it basically as a … Read more

Mirror site as the definitive version?

Migrations are really tricky because they could be really easy or a pain in the ass. (If you want a fast solution just skip the explanation and go to the Fast solution). The easy part When you are migrating your website you will need to use MySQL and access to your PHPMyAdmin. Once you login … Read more

Restrict certain roles registrations by domain

You’ll want to checkout the registration_errors filter. Make sure the role is being posted within the particular registration form. Instead of conditionally adding your action you have to check within the filter if role and email are valid. add_action( ‘registration_errors’, ‘wpse_248123_registration_errors’ ); function wpse_248123_registration_errors( $sanitized_user_login, $user_email, $errors ) { if ( empty( $_POST[‘role’] ) ) … Read more