[intermediate] Sonzy, a member of Hive, wanted to know, after moving a static HTML site to WordPress, how you retain the old URLs. That is, the old site's URLs ended with ".htm", and WP changes these to URLs based on postname and possibly the date, depending on how have WP permalinks set up. There are a few options, if your old URLs ended with .htm, .html, or other variations.
- Use 301 redirect rules in your web server's .htaccess file. Drawbacks:
- You are changing your entire site's URLs. Doing this might incur a temporary SERPs (Search Engine Results Pages) penalty and changing your rankings. (I'm not saying this will happen, just that it might.)
- The average blogger might not understand .htaccess rules.
- The .htaccess might not be accessible through your hosting account. (Depends on the host.)
- Use a WordPress URL redirection plugin. Drawbacks:
- This one is relatively easy to implement, but I've only ever tried it from within WP. That is, I didn't move from a static HTML site. I already had a WP site and wanted to go from an old permalink URL structure to a new one. I haven't tried it, but I think using a plugin will complicate matters in this case, unless you find a specific plugin designed to handle this.
- You are changing your entire site's URLs. (See above)
- Tweak the new permalinks and URL slugs in WordPress. This ensures that all your URLs stay the same as on your static HTML site. Drawback:
- Lot of manual work. Unless you know how to write SQL queries, you're going to have to do this manually. (Even if you do know SQL, you may not want to use it.)
- Install WordPress over top of your existing site. In the past, I've successfully had two different websites living on the same domain. One was a static site that had URLs with .html, and the newer site was in WordPress. This is a fairly simple upgrade. Drawbacks:
- The old /index.html page will still exist, but will not get served. That will be auto-redirected to / (your new WP home page). However, all the other old URLs will exist and be visible. So you'd have to manually port any content/ media from the old home page to the new one.
- Unless you change the layout of the old pages to match, they will have a different theme than your new WordPress site.
These are the options I've used to date, for moving from a static HTML site to a WordPress site. (This will apply for any platform that does not generate an /index.html for the home page.) Options 3 and 4 both retain the old URLs (with the exception of the old homepage for option 4).
If you're dead set on changing your old pages to WordPress but want to retain the URLs, option 3 is what you want. (If anyone has other suggestions, please do comment.) However, if you have lots of posts, expect tedious porting work ahead. (Note: You could have a situation where a search spider comes along and indexes your new URLs and finds your old ones missing. I'm merely pointing this out, but I'm not sure what the likelihood of this happening, on average, is.)

















