How to limit user registration to a specific set of domains?

You can do it easily by writing a code inside your theme’s functions.php file. here is the code: function is_valid_email_domain($login, $email, $errors ){ $valid_email_domains = array(“gmail.com”,”yahoo.com”);// whitelist email domain lists $valid = false; foreach( $valid_email_domains as $d ){ $d_length = strlen( $d ); $current_email_domain = strtolower( substr( $email, -($d_length), $d_length)); if( $current_email_domain == strtolower($d) ){ … Read more

How will self-hosted WordPress work with Google Page Speed Service?

Potential Issues Google’s Page Speed service does not work with “naked domains”. That is, it will not work with just “example.com”. The domain name must have a subdomain in front of it, such as “www.example.com”. This is due to a limitation on Google’s implementation of the Page Speed service, which requires you to set up … Read more

My wordpress site gets redirected automatically to the old site any known solution for this?

This is because the URL settings inside WordPress are still pointing to the old WordPress site. More information is available in the Moving WordPress documentation. If your WordPress admin pages are still working, you can go to Settings → General, and change the WordPress URL and the Site Address to the correct values. If your … Read more

Mapping Domains to Permalinks (not multisite)

If you set domain.com as an alias of original.com, in WordPress you have to do nothing to make it works. The problem is the countrary: once in DNS the 2 domains are aliases, every url of your WordPress will be accessible via user defined domains: domain.com/any/wp/url, but also domain2.com/any/wp/url, domain3.com/any/wp/url and so on… So, what … Read more

How to share cookies and sessions between domain and subdomain?

I’ll skip steps related to sharing DB and sharing users data and meta, based on assumption that you’ve done it correctly. Let’s concentrate on wp-config.php of both sites. These are defines that MUST BE IDENTICAL for both sites: define(‘COOKIE_DOMAIN’, ‘.domain.com’); // your main domain define(‘COOKIEPATH’, “https://wordpress.stackexchange.com/”); define(‘COOKIEHASH’, md5(‘domain.com’)); // notice absence of a ‘.’ in … Read more

How to use WordPress Multisite With Different Domain Names?

There seems to always be a bit on confusion on this topic. Perhaps WordPress could do a better job guiding it’s users in this process. Although, I suppose Multi-site wasn’t intended to be used for TLD’s. So first of all, I would install WordPress, setup multisite, and configure it as a subdomain network configuration. Here’s … Read more