Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

robberbaron
robberbaron
23,869 Points

Importing Website including 2000 Images into Wordpress

Hi!

My customer has an old website that has grown over time and is asking for a visual redesign.

Of course the site is not responsive, is not managable by herself (no CMS) and is not that structured - it's quite a mess :-) What is positive for her: The site has a very good Google ranking that she doesn't want to lose. The site consists of 95 subpages and 2100 pictures.

Now my challange is this: There is no way to handle this manually. So i want to automatically import the old page into wordpress and either apply a theme that I will buy or design one by myself.

Has any of you done such a job before? Is there any proven method / best practice?

I discovered "html import 2" - a plugin for wordpress. So I grabbed the whole site from the server with wget -r -p sitename. Then I tried the wordpress import pugin - it did some imports but most of the images (maybe 98 percent issued an error message)

Any suggestions / ideas that you could share? Maybe any other plugins? Maybe any good experience with "html import 2"-plugin for wordpress?

Cheers Marc

2 Answers

Matt Campbell
Matt Campbell
9,767 Points

I don't know anything off the top of my head but here's the issue. The copy/text needs to be entered into the database with all the correct keys and metadata that gets saved when a post is created. Images are handled as posts in their own right, which you then include in other posts.

What I fear is you're probably just going to have to manually input all of that data. It's a laborious task but this is why using a database is useful. You can create a new site and all your content remains unaffected and ready to go as soon as the design is done.

Good luck to you.

Sukhraj Grewal
Sukhraj Grewal
10,554 Points

I don't know about html import 2 plugin, but i will do this manually . I know this will be big task but this will make sure everything is in order as it was before and it will not loose google ranking. here are the steps that i will follow.

  1. Install a new wordpress.
  2. copy the text/html from old site just from body tag, which will go in wordpress posts and pages . you can work on header, footer and sidebar just once.
  3. Transfer images to new location where wordpress is installed. Easier way is if your images are in folder on old site for example youroldsite.com/images then you copy/transer as it is through ftp or cpanel to new location . yournewsite.com/images/ so it doesn't matter how many images ftp program will do it automatically. This way also helps when you copy text/html in pages in wordpress it will keep same html code and you don't need to update it for example if image code on page is <img src="youoldsite.com/image/image.jpg" /> then it will same as in new wordpress . Only thing is it won't be visible in your wordpress libarary.
  4. Once you got all pages, posts, and images. you can set permalinks as before for example on old site if you have page url youroldsite.com/oldpage.html then you can keep the same page title in wordress and add .html through custom permalinks in wordpress setting. If you don't get same url then you can install plugin called Redirection where you can tell you old url and new url which will redirect your old url to new with 301 redirect, this way you won't loose any google ranking.

Hope this helps Good Luck