Many websites start out being created with nothing more than HTML, CSS, and a few images. For some, that will always be enough and there will never be any need to change. For others, however, there will come a time when more is required.
You may want to add social networking capabilities to your site. Or you may want to add e-commerce. Or you may have a large number of pages that are cumbersome to manage and update by hand. Whatever the reason, WordPress is almost always an excellent fit, and can handle a lot of the heavy lifting for you. Adding the Genesis framework will position you to more easily keep up with what the search engines want and what your readers want, and thus help you create more and better engagement, and if you’re a business, leads and sales. This combination creates a win-win for everybody.
This tutorial was written specifically for those who are ready to make the jump, but are not sure how to go about it. At first, the prospect of making this transition might seem daunting and you might wonder where to begin. Rest assured that there’s no need to feel overwhelmed because we’ll cover the process from beginning to end so that you will never get lost along the way.
In this post, you will learn how to:
- Prepare for the transition
- Temporarily keep your new website hidden from both visitors and search engines
- Transfer the content from your old website into WordPress
- Create a genesis-powered child theme using your current template
- Protect your website’s position in the search engines
- Make sure that your new website is error-free
Preparing for the transition
Before going any further, it’s extremely important for you to create a backup of all of the files that currently make up your static website. That way you can ensure that none of the data from your original website is lost. This is important for two reasons. The first being that it’s always best to keep a copy of every version of your website because you never know when you might need to refer back to it for one reason or another. Secondly, during the transition, you will need your static website to remain online and functional until your WordPress website is ready to go live. Should one of the files from your current website accidentally get deleted before the transition is complete, you can easily upload a replacement copy from your computer to get things back in working order.
After backing up all of the necessary files, you will next need to document the name of each of your web pages and its web address. I do this using a spreadsheet. Open your spreadsheet program and then label the first column File Names . Next, label the second column URLs. Visit your website and then begin recording this information in your spreadsheet.
This step is important because, before your WordPress website is made visible to the search engines, you will need to use this spreadsheet, along with a redirection plugin, to create several 301 (moved permanently) redirects so that the previous URL for each of these web pages points to its new location.
Hiding your new WordPress installation
Normally , after installing WordPress, you would get right to installing a theme, configuring the software to your liking, and then adding content. In this case, however, additional steps need to be taken to ensure that your WordPress installation temporarily remains hidden. Secrecy, at this point, is important for two reasons:
- When migrating from static HTML to WordPress, it’s important that you continue to direct visitors to your original website for as long as possible. This measure will avoid a great deal of inconvenience and confusion that your visitors might otherwise suffer.
- While creating the WordPress version of your website, you don’t want it to be prematurely indexed by the search engines because, at this point, it’s still a work-in-progress.
So, the first thing that you need to do to keep your new website temporarily under wraps is locate the index.php file located in the main folder of your WordPress installation and then rename it to 1index.php . Adding the number one to the beginning of the file name will make it easier to locate when it comes time to return this file to its original name since it should appear at the top of your file list just under .htaccess . Renaming index.php guarantees that your index.html file will continue to act as your website’s home page for the time being.
Having done that, your WordPress website is now hidden from visitors. Now you need to take steps to ensure that it’s also hidden from the search engines crawlers. To do this, begin by logging in to your WordPress administration panel. Once there, click on Settings|reading. On this screen, you will find a section labeled “search engine visibility”.
In this section, you can choose to make your site visible or invisible to the search engines. Since you don’t want the crawlers to index these pages just yet, check the box labeled “discourage search engines from visiting this site”. Then, click Save Changes .
This setting doesn’t guarantee that search engines won’t crawl WordPress since websites with this option selected have been known to have been indexed. Taking this measure does, however, at least reduce the likelihood of your WordPress website appearing in the search results until you’re ready to reveal it to the crawlers and the world.
Adding Your Content
Since your content lives on your static site as pages, you’ll want it to do so in WordPress as well. You will need to manually add all of your pages. This process may seem daunting at first, and depending on how many pages you have, it can be time-consuming. We’ll walk through this process so you can get a feel for how it’s done.
For this example, suppose that you’re recreating a page from your static site called Services . To do this, navigate to Pages | Add New . On this screen, enter Services as the title of this page. Then, paste all of the content that was previously included in the body of your static Services page into the text area. Well, almost all of the content. If you’ve included HTML 5 markup in your static pages, you won’t need to add this information, because your theme will add it for you. Now, click Publish to add this page to your site. Repeat this process for each of the web pages found on your static website until all of your content has been transferred over to WordPress.
Partially revealing WordPress
At this time, you will need to locate 1index.php on your server and then return it to it’s original name of index.php . Next, find index.html and then rename it to 1index.html . Both of these steps must be taken at this point because, once your theme is activated, you will need to be able to access your WordPress home page in order to proceed. With index.php in place and index.html renamed, your WordPress website will now be visible to visitors, but it will still be hidden from search engine crawlers.
Turning your current template into a theme
You may think that migrating to WordPress means that you will also have to give up your current website design. This, however, doesn’t have to be the case. If you’re happy with the way your website looks now, then it’s entirely possible to continue using your current design. To do this, you will need to convert your static HTML/CSS template into a theme. Since we’re using Genesis for this tutorial, you’ll need to convert your template into a child theme. This is not going to be as hard as you may think. When you purchase the Genesis framework, you get a sample child theme you can use to build cool things. We’re going to use that sample in this tutorial.
Introducing WordPress To Your Theme
In order to use your new theme with WordPress, your theme needs to arrive with some information that lets WordPress know what to call it, and that it’s a theme in the first place. To add this information, first open the style.css file in a text editor. The style.css file is found in the genesis-sample file you get when you download the Genesis framework. Unzip this file and put it somewhere you can find it on your computer. Once you’ve done that, you’ll be able to open the genesis-sample folder and find style.css.
First, you’ll need to give your theme a name. In the sample stylesheet, replace the word “sample” with your theme’s name, and keep the formatting of the line exactly how it appears. This will make things easier later if you want to make changes to this theme. Next, do the same with the description line. It’s a good idea to write an accurate but short description, so that you can easily determine which theme this is in your WordPress administration panel. After this, fill in the author (that’s you), the author’s URL (that’s your web site), and finally the theme’s version number.
After these lines, you’ll see a bit about tags. These may be useful if you plan on selling this theme later on. Next, you see some lines about the template, template version, and type of license used. Leave these intact.
Getting Down To Business
Now we get into the meat of the style. You’ll see a section within CSS comments called “table of contents”. This lets you know exactly where each section of the styling is in the stylesheet. When making your customizations, it’s helpful to add any that don’t already have an entry here to this list, and add comments above the customization. This keeps everything well-documented. Are you noticing a trend?
At this point, because StudioPress has already included most of the styling elements you’ll need for your static site, you can fill in the details where appropriate, and add anything you don’t see a style for.
Let’s Talk About Functions
If you’ve never written a program, and your only exposure to websites is to HTML and CSS, playing around with PHP can seem very scary. I promise, it’s not that bad. StudioPress has included all the functions you need for you in the sample theme, at least for a completely static web site. Of course, you can always add more later, but for now, the fact that they’ve already included what you need will save you a lot of work on the theming front. All of this documentation and inclusion is where Genesis really shines. If you were doing this with another theme, or creating a theme from scratch using the standard method used by most free themes, you’d still be creating templates and styling everything yourself.
Maintaining search engine ranking
During the process of migrating from a static website to WordPress you will be adding new pages and posts. You will also eventually delete all of your original HTML pages since they will become unnecessary and redundant. This means that your previous content will now exist on pages that are located at completely different web addresses. If nothing was done, then your website would lose its search engine ranking and PageRank for each of those deleted pages. Another consequence would be that anyone clicking those outdated links would arrive at 404 pages rather than the web pages that they hoped to visit.
This is a less than desirable situation and, luckily, it can be avoided by installing the Redirection plugin. With the help of this plugin, when the search engines arrive to crawl your website, they will be sent to the updated location for all of your old web pages. These redirects will also be beneficial should a visitor happen upon an outdated link since they will also be redirected to the page’s new location.
The Redirection plugin is primarily designed to manage 301 redirects. This functionality is especially useful when migrating from a static website to WordPress because you’ll need to do a lot of redirection in order to get the search engines and your visitors to your new pages. In addition, this plugin also has the ability to track 404 errors. This will prove useful as it will allow you to monitor your website for errors and to ensure that everything is performing as it should be.
In order for this plugin to operate properly, permalinks need to be enabled on your site. You should, therefore, configure that WordPress setting before installing and configuring the Redirection plugin, so click on Settings | Permalinks . On this screen, in the Common settings area, choose any of the available options other than default. Then, click Save Changes .
Setting up and configuring Redirection
After installing and activating the plugin, go to Tools | Redirection . This will take you to the first page of the Redirection settings and configuration area. It’s on this screen that you will enter all of the necessary 301 redirects.
To do this, open the spreadsheet that you previously created. Copy the URL of the first static page listed in the spreadsheet and then paste it into the Source URL textbox. Next, enter the new URL for that web page into the Target URL textbox. Then, click Add Redirection . Repeat this process for each of your static web pages.
Clicking Groups , Modules , and Options will take you to additional settings screens for this plugin. These remaining options can, however, be left at their default settings and everything should run smoothly.
Completing the switch to the new website
You already began to make the switch over to your new website when you reverted index.php back to its original name and renamed index.html . With your 301 redirects in place, it’s time to complete the transition. The first thing that you need to do is delete all of the files that comprised your original website.
Next, return to settings|reading and check the box to allow search engines to begin visiting your new site.
Testing your new website for errors
One of the last steps you need to take to check your website for errors. In regard to markup and CSS vaidation, if you’ve kept to the documentation and style examples in the genesis-sample theme, your markup should be good to go, and so should your CSS. You’ll want to take the time to visit the World Wide Web Consortium and validate your links, because by doing so you’l find out which links are broken so you can fix them before you start adding new content. Waiting to do this could prove to be a huge time vampire later. You’ll also want to take the time to make sure your site is cross-browser compatible to the extent that it can be. Test it in different browsers to make sure it looks and acts as it should.
If you’ve made it to the end of this tutorial, congradulations. You should have a fully functional website on WordPress. This is a long process, but once you’ve made the switch, managing your site becomes so much easier in a lot of ways.
Show Me Yours
I want to see what you’ve build. Feel free to leave a link in the comments and I’ll drop by.