Skip to main content

Share Cookies between multiple WordPress sites

February 10, 20151 min read
/** This post is now outdated. You can find the updated version here. **/   Let me just start by saying finding information regarding this topic was plentiful, but there wasn’t really a solid way or explanation on this process. Hopefully I can make it easy enough to follow. The process is different for Multi-Site and Separate Installs so make sure you follow the correct instructions. I’ll start by helping you with the common steps then we’ll break down into the individual tasks.
  1. wp-config.php
    • Lets assume that your website is www.example.com and you have a second site at either “number2.example.com” or “www.example.com/number2” as either one works for this.
    • in your main site’s config file (www.example.com) you will be adding a few lines
      • define('SECRET_SALT', 'Random_String'); define('ADMIN_COOKIE_PATH', '/'); define('COOKIEPATH', '/'); define('SITECOOKIEPATH', '/'); define('COOKIEHASH', md5('Random_String'));
    • Replace “Random_String” with a random string of letters, numbers, and characters. I just used the WordPress salt generator and took one of the strings from there.
    • I know that was difficult to do but now your website’s will use the same cookies for their logins…
    • NOTE: If you have two WordPress installs you will use the exact same settings above for BOTH wp-config.php files.
ROI Calculator

What's a Better Website Worth to Your Business?

Enter your current metrics to see how even small improvements in conversion and traffic can impact your bottom line.

Your Current Metrics

50%
30%
$

Your Results

Conversion Rate

0%

Qualified Leads/Mo

25

New Customers/Mo

8

Monthly Revenue

$75,000

Revenue Impact With a New Website

With +1% Conversion Rate

+$15,000/mo

+$180,000/yr

With +30% More Traffic

+$22,500/mo

+$270,000/yr

Combined Impact

+$42,000/mo

+$504,000/yr

63.0x ROI

Your website could pay for itself in months

Based on your numbers, a professional website redesign could generate an additional $504,000/year — a 63.0x return on your investment.

Book a Free Triage Call