Got an issue with your WordPress installation? The problem may be that the Home and Site URL are not set properly. Let’s take a look at the problems that could occur, and also dive into solutions!
Errors you may see if the Home and Site URL are not setup correctly include:
- When visiting your site, the page shows a redirect loop error.
- Your site content loads, but without any CSS (formatting).
- Your site appears fine, and so does the wp-login.php page. But, just after logging in, the URL changes to something else and won’t allow you to login.
- Site shows a completely different webpage
How to correctly set your Home and Site URL:
First, you’ll need your FTP account information. Here’s our wiki on how to login via FTP: http://wiki.dreamhost.com/Ftp
I recommend using the FTP client Filezilla to connect. But any FTP client will work the same way.
Just use the following information to login:
HOSTNAME: this is simply the domain name without the www.
SERNAME: Can be found under “Domains > Manage Domains” to the right of your domain.
PASSWORD: This is the password you created for you user under “User > Manage Users”.
PORT: If your user is an FTP user, it will be port 21. If it’s SFTP or SHEL it’s 22
Once you’re logged into your FTP account, you’ll be in your domains directory. There, you’ll see your WordPress files. Open the file named wp-config.php. This file contains all of your database information. For example your HOSTNAME will be something like: mysql.mydomain.com
Enter that into your browser – a login prompt will appear. Enter the user/pass info in your wp-config.php file and you’ll be logged into phpMyAdmin to view your database.
NOTE: You can also find your database login credentials on this page in your Dreamhost Panel.
Once logged into phpMyAdmin on the left, just click on your database name. Next, find the table named ‘options.’ This will appear as wp-options. Once clicked, on the top left click the ‘browse’ tab. Most likely the first entry will be your ‘site url’. To the right – under the column ‘option_value’ – you’ll find the URL you are using for the site. (This sentence was incomplete; I assume the term “site” was supposed to be added at the end of this sentence? Please confirm with the author.)
On this same page, there’s a page number drop-down on the top right. Choose Page #2. Here you’ll see your Home URL. For my database, it’s number 36. Both the HOME and SITE URL must match what you set up in your panel for the domain. Let’s assume that both your HOME and SITE URL are www.mydomain.com. (NOT mydomain.com – notice there is no www in there!). Here’s an article from WordPress describing this:
Now, in your Dreamhost panel, go to the ‘Domains > Manage Domains’ page here:
To the right of your domain, click the ‘EDIT’ button under the column ‘Web Hosting.’ The very first option is how your site URL will appear. WITH or WITHOUT the www. (DO NOT leave it as ‘Leave it alone.’Wordpress makes you choose). So, if in your database the URL was www.mydomain.com, make sure the option in your panel also shows:
This way, the HOME and SITE URL in the WordPress database will match what’s in your Dreamhost panel, and you shouldn’t see any more issues with the site URL resolving.