[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Testing WordPress transfered to new host before nameserver change

Posted on 2011-09-15
7
Medium Priority
?
404 Views
Last Modified: 2012-05-12
I've transferred a WP blog to a new host and I'd like to test the installation before I change the nameservers from the old host to the new host.
 
Old host: goDaddy.com
 New Host: HostGator.com
 
At both sites the blog is at a domain that is an add-on domain to the main hosting account.
 
I've transferred the DB and the files. When I test with the URL: http://msnewmark.com/DinahSnow.com/ (caps essential) I get the header, but not the content on the main page.
 
What I would like to see is at: http://dinahsnow.com.
 
My question is, will this anomoly fix itself once I change the nameservers?
 
Thanks,
 Martin
0
Comment
Question by:msnewmark
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 36546563
You might need to mess with the settings for the front page on the testing server to get the page to show up.  Sometimes moving environments confuses WordPress.

Try setting the front page to something different (like About), save it, test, then put your preferred front page content back.
0
 

Author Comment

by:msnewmark
ID: 36547146
I'll try it. Thanks.
0
 
LVL 5

Expert Comment

by:zippybungle2003
ID: 36548022
0
Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

 

Author Comment

by:msnewmark
ID: 36552075
I have read that, but it didn't address my particular question. The process they mention for keeping the old site running may work in this case. Thanks.
0
 
LVL 3

Accepted Solution

by:
ZenArcher earned 2000 total points
ID: 36552305
Martin,

Your problem arises because the WordPress database is looking for a permalink that is defined on the other server. The header you see is actually coming from the GoDaddy site.

The best way to set up a new server and test it fully is to hardcode the IP address in the site home and site URL variables. This will override the domain naming issue. Hostgator cPanel shows this IP info in the sidebar.

Simple edit the config.php file with your FTP program and the hardcoded values will override the database values.

Edit wp-config.php
It is possible to set the site URL manually in the wp-config.php file.

Add these two lines to your wp-config.php, replacing "example.com"  with the IP address of your site.

define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');

Open in new window


I believe, in your case it would be: 216.172.180.209.
NOTE:
But because it is an add-on domain, you will need to add your username or something "/msnewmark/" to the URL string. Check with Hostgator for a temporary url suggestion.

NOTE: this is 99% of your solution.
define('WP_HOME','http://216.172.180.209');
define('WP_SITEURL','http://216.172.180.209');

Open in new window


SEE http://support.hostgator.com/articles/temporary-url for your precise URL.


Temporary URL
The temporary URL is used when your domain name is not working. Here is an example of the format, your actual URL can be found in your New Account Info email.

Hosting with cPanel:
http://serverIP/~cpanelusername/
(Be sure to replace "serverIP" and "cpanelusername" with the actual values.)

Hosting with Plesk 10:
https://serverIP:8443/sitepreview/http/mydomain.com/
(Be sure to replace "serverIP" and "mydomain.com" with the actual values.)

Hosting with Plesk 8 and 9:
http://serverIP/$sitepreview/mydomain.com/
(Be sure to replace "serverIP" and "mydomain.com" with the actual values.)

Note: If you forget the trailing forward slash (at the end) the you may be redirected to a different URL.

You can actually use any domain or server name followed by /~cpanelusername/ to see that user's site. This will cause any domain on the server to show the site for the username. That's how cPanel setup works so we can't prevent this method from showing someone else's site on your domain.

Here is the format for addon and subdomains.

Hosting with cPanel:
http://serverIP/~cpanelusername/path_aka_document_root/
(Be sure to replace "serverIP", "cpanelusername", and "path_aka_document_root" with the actual values.)

Hosting with Plesk 10:
https://serverIP:8443/sitepreview/http/otherdomain.com/
(Be sure to replace "serverIP" and "otherdomain.com" with the actual values.)

Hosting with Plesk 8 and 9:
http://serverIP/$sitepreview/otherdomain.com/
(Be sure to replace "serverIP" and "otherdomain.com" with the actual values.)


Best,
Tony
0
 

Assisted Solution

by:msnewmark
msnewmark earned 0 total points
ID: 36552602
Tony,

You rock! Your solution took me most of the way there. I knew it was a problem like this, but I had no idea about setting those variables in the config file.

The one thing that was missing is a change to the .htaccess file to get the permalinks to work. If you use the info at the wordpress site that zippybungle2003 mentioned you get the total solution. When you change the WP_HOME and WP_SITEURL using the WP control panel it changes the .htaccess file to look like:  
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /~newmark/DinahSnow.com/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /~newmark/DinahSnow.com/index.php [L]
</IfModule>

# END WordPres

Open in new window


The two lines that refer to DinahSnow.com are changed and make permalinks work. With out that change only the homepage works.

Thanks to everyone for your help!

-Martin
0
 

Author Closing Comment

by:msnewmark
ID: 36572311
Thanks to all!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Now that you've installed WordPress 2.9 (http://www.experts-exchange.com/articles/Web_Development/Blogs/WordPress/WordPress-2-9-What-to-Expect-When-Upgrading-to-WordPress-2-9.html?) on your site, you need to install some plugins to get the most out …
In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question