Move a website from HTML to WordPress
In today’s tutorial we see a classic: How to pass a pure and hard HTML web to WordPress, importing all the content automatically.
Static websites
Currently, 1 in 4 websites is made in WordPress . In fact, it is the most used CMS worldwide, without any doubt. Its main competitor is only 2.8% of the market. But there is “something” that beats him. You know what? Effectively. Static websites Those that are made in HTML.
1 in 4 websites is WordPress
More than half of the world’s websites are made “by hand”.
As you can see, 57.2% of websites are handmade, without any content manager. But if you look at the trend of the last 4 years, you will see how there is less and less. In a short time they have dropped 20 points that are recorded by CMS, especially WordPress.
If you are WordPress implementers , you will have noticed that there is an increasing demand to pass “static websites” to WordPress. In fact, I would recommend offering this service if you do not have it in your catalog, because 2 or 3 requests of this style arrive to me every week.
So, the question is … How should you converting html to wordpress? That is, how to convert a web with several pages and “handmade” entries to WordPress pages and entries?
Obviously, one possible way would be to do it by hand, based on “Copy and paste” content from the web to the WordPress editor. And that is the best solution (and the one I recommend) for small corporate websites. But what happens if it is a website with 300 pages? Or a blog with 3,000 articles? Obviously, it does not count to do it one by one. How to automate the process?
From HTML to WordPress
Well, thanks to Stephanie Leary we have a fantastic plugin that will allow us to accelerate and automate the process without problems. This is HTML Import 2 . So we will install it, activate it, and get to work.
The first thing will be to visit the options page, which we have in “Settings / Import HTML”.
The plugin will add an options page
As you can see, by default we go to the “Files” tab, where you will be asked for 6 settings to configure:
Directory to import: Here you have to indicate the directory of the server where you have the “old” web. You can move it to a directory called “old”, for example. Or directly create the “html-files-to-import” directory that you propose by default.
Old site URL: Here you have to indicate the URL of the location of the old website. Normally it will be the root of the web, that is, something like https://boluda.com. This will be used to place an .htaccess file with redirects from old URLs. This step is VERY IMPORTANT for SEO.
Default file: Indicate if the server uses the index.html or default.html file by default.
File extensions to include: Indicate the extensions of the files you want to transform to posts and pages. The normal will be “html, php, htm, asp” among others.
Directories to exclude: In the case that there is a directory that you do not want to import, you simply indicate it here, separating them with commas.
Next we go to the “Content” tab. This is where we are going to tell you “how” to do the conversion. That is, where to get the content of the post or page. We have to think about the file there will be a lot of text, but we are only interested in the content of the article or page. But not the rest.
html content to wordpress
We will tell you where to get the content .
As you can see, there are two sections. In the first we will select the content delimiter, and in the second the options.
Select content by:
HTML tag: We will indicate the content that will be delimited by a tag such as <content> or <entry> or <article>. We will indicate the label, the attribute and the value.
Dreamweaver template region: If the old website was in Dreamweaver, we will indicate the name of the region.
Import entire file: This will simply import all content, without limitations. Better not to use this method unless we are importing text files with only the body of the article.
More content options:
Import linked images: We will also import the images that appear in the document.
Import linked documents: We will also import the documents that we are linking (PDFs, audios, videos, etc.) .
Update internal links: Links that go to the page itself will also be imported.
Use meta description as excerpt: If the old website has the meta tag “description”, use it as an extract. More information in the class WordPress Course SEO # 2: Titles and meta tags .
Convert special characters (accents and symbols): Convert special characters such as accents, “ñ”, etc. We will say yes.
Clean up bad HTML: It will remove all the remaining HTML, created by certain FrontPage-style applications, Word, etc.
Important: This is to import HTML files into WordPress. If you want to migrate from one WordPress
Summary and conclusion
There is an increasing demand to pass static websites from HTML to WordPress. If you are implementers, you are already taking time to offer the service, and if you need it for your project, you have it very simple.
Thanks to the HTML Import 2 plugin you can import HTML files into WordPress, delimiting both title, content and even custom fields, in a periquete. It even handles 301 redirects!
And as always, you know: If you want to learn much more about WordPress, Online marketing and web development, check out the courses : More than 3750 videos at your disposal. Flat rate with immediate access to all! 🙂
Comments are closed.