Fix “Cookies Are Blocked” Error in WordPress Multisite (Easy Solution)

If you recently enabled WordPress Multisite with subdomains, you might see this frustrating error when trying to log in:

Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.

This issue is very common, especially in local development environments (XAMPP, MAMP, LocalWP) or when switching from subdirectories to subdomains. Luckily, the fix is quick and easy.


Quick Fix for WordPress Multisite Cookie Error
  1. Open your WordPress wp-config.php file.
  2. Just before the line that says: /* That's all, stop editing! Happy publishing. */ add this code: define('COOKIE_DOMAIN', false);
  3. Save the file and refresh your browser.

That’s it 🎉 — the login issue should be solved.


Why This Fix Works

By default, WordPress tries to set a single cookie domain for all your sites. This causes problems in a subdomain multisite network (e.g., site1.example.com, site2.example.com).

When you set:

define('COOKIE_DOMAIN', false);

WordPress automatically handles cookies per subdomain, ensuring login works smoothly across your network.


Additional Tips to Avoid Cookie Issues
  • Use a custom domain (e.g., example.local) instead of localhost.
  • Add subdomains in your /etc/hosts file (macOS doesn’t support wildcards).
  • Update your Apache or Nginx config with: ServerAlias *.example.local
  • Clear browser cookies and cache after making changes.
  • If you’re using SSL, also check this setting: define('FORCE_SSL_ADMIN', true);

Final Thoughts

The “Cookies are blocked” error in WordPress multisite is not a browser issue—it’s a configuration mismatch. With a single line of code in your wp-config.php, you can quickly fix the problem and continue building your multisite network without interruptions.

Leave a Reply

Your email address will not be published. Required fields are marked *