Just want to use DreamHost for DNS? You can do that!
Login into your Panel and go into Domain > Registrations.
Click the “Add Hosting” button on the far right.
It will redirect you to a new page and from that page you can select from “Fully Hosted, Redirect, etc”. The very last one is “DNS Only”.
Go ahead and select that and there you go!
You can also go to the Manage Domains page and click on (Add New Domain / Sub-Domain button), and scroll to the bottom of the next page to set it up for DNS Only.
Congratulations, you’ve decided to go Multisite and added in all your lines to your config file. You’re raring to go, and the last step is to log out and back in.
But you can’t.
You get to the login screen, enter your credentials, and the page just refreshes. What’s on earth is going on?
This is actually a pretty rare thing, and I was only able to reproduce it when I moved my site on the server. The fix is actually pretty easy, and there are three things to do.
Sometimes, however, browsers are idiots and you have to flush the local cache. You shouldn’t need to dump caching plugins, since that doesn’t impact logins.
3) Delete your cookies.
I hate this one. Delete the cookies only for your domain if possible. Chrome hides this, but it’s doable for all sites.
4) Check your .htaccess
A lot of people miss this. When the directions say ‘Replace your .htaccess with this…’ what they mean is replace. And yet many people leave in the old WordPress rules. Remember to replace your .htaccess calls for WP with the correct one: Multisite .htaccess rules
5) Check your wp-config.php again
You need to have both define('WP_ALLOW_MULTISITE', true);anddefine('MULTISITE', true); in there.
But what if you have this problem on Single Site? Do the same thing, but if you’re using CloudFlare, go check your settings. They’ve been known to cause problems with this, due to handling of redirects. Me and a coworker wasted a couple hours on that, before someone else pointed it out.
Edited to add….
6) Kick wp-config.php in the butt
Tom McFarlin came up with added this to your file:
This actually isn’t hard to do, but it can be tricky to complete if you don’t remember what you started with.
To start with, let’s say I have a multisite with subdomains: ipstenu.loc. I’ve added in two subsites, foo.ipstenu.loc and bar.ipstenu.loc. But then I decide I really wanted to have ipstenu.loc/bar and ipstenu.loc/foo instead.
The easy part is first. I know my wp-config.php has this:
All I have to change is the one line define('SUBDOMAIN_INSTALL', true); to define('SUBDOMAIN_INSTALL', false); and now I’m using sub-folders!
But that means that foo.ipstenu.loc isn’t really valid. Amusingly, it doesn’t break anything at first, so the still will work. But once I change the .htaccess, things will get hinky, so I’m going to do the ‘hard’ part.
Go in to Network Admin -> Sites and Edit each site that uses a subdomain and you’ll see this:
Looks familiar, right? I’m going to change foo.ipstenu.org to ipstenu.org and the line with / becomes /foo/:
As soon as I hit save, the site is ‘moved.’ Great! Do this for all my sites and .. wait. Now they look all ugly!
That’s because I have to edit the .htaccess. Go to Network Admin -> Settings -> Network Setup, and copy the .htaccess from there, replace, and now it works too.
The one last step is re-saving the permalinks in your main site, and remembering your links are about to break. What’s that now? Oh, yes, you see ipstenu.loc now gets /blog/ shoved in for any posts, so ipstenu.org/2012/postname became ipstenu.loc/blog/2012/postname. The catch here is that if you don’t resave the permalinks, they will continue to work until you do. Once you hit ‘save’ on permalinks, blog jumps in, and WordPress cheerfully redirects people for you, so you lose nothing.
I don’t like Google very much. However when my grandmother had a request for something to be added to her website, I realized Google’s email would actually be much easier for them, especially since her domain, taffys.org, is mapped to this server as a part of my Multisite network. Oh, it’s not terribly hard to make emails for her, but she wanted someone local to do that.
There’s a minor story behind that, but the shortest version is she’s doing some totally awesome not-for-profit work with Parkinsons patients. One of the things she wants is an email, used by many people, to ‘collect’ messages like ‘I’ll be there.’ While I could do this on my site, it’s actually easier to get this up on Google, where I can tell people login to go to http://mail.google.com/a/taffys.org or http://mail.taffys.org and it’s something they know.
I chose to do this by command line, for the experience. If I wanted to do it via cpanel and WHM, you’d go in to edit the DNS zone for the server and add in the mx records.
MX Records
The command dig mx taffys.org tells me what I have right now, which I knew was self referential.
Looks like that for all my stuff. Okay, no problem, I go in and edit /var/named/taffys.org.db and find this:
taffys.org. IN MX 0 taffys.org.
Change it to this:
; Original
; taffys.org. IN MX 0 taffys.org.
; Gmail
taffys.org. 14400 IN MX 10 ASPMX.L.GOOGLE.COM.
taffys.org. 14400 IN MX 30 ASPMX2.GOOGLEMAIL.COM.
taffys.org. 14400 IN MX 20 ALT1.ASPMX.L.GOOGLE.COM.
taffys.org. 14400 IN MX 30 ASPMX4.GOOGLEMAIL.COM.
taffys.org. 14400 IN MX 30 ASPMX5.GOOGLEMAIL.COM.
taffys.org. 14400 IN MX 20 ALT2.ASPMX.L.GOOGLE.COM.
taffys.org. 14400 IN MX 30 ASPMX3.GOOGLEMAIL.COM.
And then I ran /usr/sbin/rndc reload taffys.org to refresh it. But ... wait. Why does it still say I'm on taffys.org? Per usual, I didn't bother to change my TTL. As everyone always reminds me, if you make a change to DNS without lowering your TTL values, you're gonna have a bad time. Since I'm (rarely) in a rush for this stuff, meh. Besides, it takes 24-48 hours from changing TTL for it to be usable, and then I can make my change. Followed by waiting again, and then changing it back? DNS is pretty zippy these days. 72 hours max, and usually less, so I just don't.
While I waited on that, I went ahead and made a Google Apps account for taffys.org. When you go to Google Apps they only show you business and education. I'm neither (though I suppose what I'm doing for Taffy would be non-profit). Really they're trying to sell, which makes sense. If you go to their pricing model, you'll see the free option. Unless you're running a business, click that.
The rest of the directions are really straight forward, and Google shows you what to do. It's really just set up the account stuff from there out. The directions to make mail.yourdomain.com are under Create a custom web address.
If you want to do it with a GUI, it's even easier. I went into my DNS management setup on cpanel and did this:
Will I do this for other domains? Maybe. I think I'll be doing this for hosting going forward, since the people I host rarely (ever?) use cPanel. Congrats, Taffy! You're the first! Liv's the second.
The basic concept is you want to allow users to log in and out via a sidebar, and never see the admin-end of WP. There’s an awesome plugin called Sidebar Login that already does this, but I decided to play around and make a dead simple widget. There’s no ajax going on here, and very little code since it all calls the built in functions and filters.
It lets you make a few choices, as to what verbiage you want to use, and if you want to show login/registration info or not. The registration link won’t work if you have registration turned off, natch.
Really those hacks are more ‘mu-plugins’ that I don’t want to support, but still wrote, but you get the idea.
I’ve taken to writing up the code, when I can, for people in the forums a little more, since it helps me as a developer get better with WordPress. I’m still new at wrangling widgets, so this was a new, and interesting, experience for me. That brought up questions for me, as to where people like the plugin ‘settings’ to be.
So this happened after people asked me about how to make a widget. This makes a slightly customizable widget that will let you have a slightly customized login form via a widget.
As with all hacks, you’re on your own for support. Code is GPLv2, and it should be translatable.
Download Code
The code is in a .txt file. Rename if .php and toss it in mu-plugins
Sidebar Login Widget is released WITHOUT any support, and you can
use it at your own risk. The code should work, but I’m not spending
a lot of time on it.
*/
if (!defined(‘ABSPATH’)) {
die();
}
// Register the widget
function sli_register_widgets() {
register_widget( ‘sli_SLI_widget’ );
}
add_action( ‘widgets_init’, ‘sli_register_widgets’ );
// This is the widget!
class sli_SLI_widget extends WP_Widget {
Contains information related to marketing campaigns of the user. These are shared with Google AdWords / Google Ads when the Google Ads and Google Analytics accounts are linked together.
90 days
__utmx
Used to determine whether a user is included in an A / B or Multivariate test.
18 months
_gali
Used by Google Analytics to determine which links on a page are being clicked
30 seconds
_ga_
ID used to identify users
2 years
_ga
Used to distinguish users.
2 years
_gat
Used to throttle request rate.
1 minute
_gid
Used to distinguish users.
24 hours
__utma
Used to distinguish users.
Persistent
__utmb
Used to determine new sessions/visits.
30 minutes
__utmc
Used to determine if the user is in a new session/visit.
Session
__utmt
Used to throttle request rate.
10 minutes
__utmv
Used to store visitor-level custom variable data.
2 years
__utmz
Stores the traffic source or campaign that explains how the user reached your site.