Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress

Host Gator Help

I have been tasked to create a splash page for a friends music. The page HTML is all set to go but he wants his existing website to still be in operation. How in Host Gator am I able to transfer the existing website to a different url and use his main url for the splash page. For example his site is andycookmusic.com. I want andycookmusic.com to lead to the splash page. How do I transfer the site to something like andycookmusic.com/blog so I can retain it?

6 Answers

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Try checking out this video: http://teamtreehouse.com/library/local-wordpress-development/local-wordpress-development/migrating-wordpress-from-local-to-live-server

It talks about migrating from local development to a live server, but you may find it helpful for transferring from one domain to another.

John Breiner
John Breiner
6,918 Points

In the FTP or filemanager create a folder with the name of what you want it to be. So for your example name it blog. Take everything there that makes up the current site and move it into that folder. Make sure to maintain the current structure, so as not to break any links. Once you have done that, you can then upload the splash page.

Thanks John. Could you be more specific as to what files I should be moving? For example when I go to the Document Root the main folder is /home4/andycook and all of the files are under that main folder.

John Breiner
John Breiner
6,918 Points

Since you are using wordpress, you would need to move the whole wordpress install. That means unless you have something else also installed on the server, it should be most of the files in that directory. .htaccess should stay and anything else that isn't a piece of wordpress.

I'm still a little unsure on how to successfully move the files. I hate to barrage you with questions. Is there any tutorial on treehouse for this. I hate to bother with so many questions!

Matt Campbell
Matt Campbell
9,767 Points

Hi Matthew Ducey

If you're using WordPress, you don't need to worry about moving files at all.

You'll need to do a couple of thing to WP ready your splashpage but then you can choose in WordPress what page from the list of pages in the admin area to use as your homepage.

To add your splashpage to the list of pages in the WP admin area, you just give the template the title of Splashpage and create a new WP page named splashpage and assign the splashpage template to that page.

Now, the homepage of the site will be the splash page and everything else will remain completely untouched.

To WP ready your html, change it to a PHP file and add this code at the top of the file:

<?php get_header();
//Template Name: Splashpage 
?>

and this code at the bottom

<?php get_footer(); ?>

You can leave all your HTML head section and treat it as a static HTML page with links to stylsheets etc. You just got to have that code there to initiate the core WP functions so that you can use this template in WP and the page actually "runs".

If you need anymore help, ping me an email to matthew@globotek.net

It would probably be easier for me to show you over a sreen share on Skype than try to type it all out.