How to move a Wordpress blog to Google App Engine

Source: Internet
Author: User
Tags wordpress blog

Google App Engine (Gae) is Google's Internet application engine service. Users can use the APIS provided by Google to develop their own websites or Internet applications, while servers and bandwidths are all implemented by Google's Server clusters. Gae is considered by developersHigh-speed and free VM.

The current preview version supports:
1. Each user has 10 applications ).
2. Each application has a storage space of 5 million MB and a total of million page views per month.

It is more than enough to build a small website. If your blog is WordPress and you want to move it to Google App Engine, it may be difficult because Gae currently supports Python and WordPress is a PHP program. Importing WordPress data to a blog program that can be run in Gae is the most practical method for migration.

I made an image on Gae for the blog of shouxuan: http://watch-life.appspot.com/

The following describes how to try it:
Http://www.watch-life.net/wordpress/wordpress-2-gae.html

1. Register Gae.
Link: http://appengine.google.com/

You must register a Gmail user.

2. log on to Gae and create an application).
For example, the name of the newly created application is:Watch-life

3. download and install the App Engine SDK
Link: http://code.google.com/intl/zh-CN/appengine/downloads.html

For example, my installation directory is: D:/program files/Google/google_appengine

4. Download and install Python 2.5
Link: http://www.python.org/ftp/python/2.5.4/python-2.5.4.msi.

Why 2.5? Because Gae currently only supports 2.5.

5. Download The micolog blog Program. Http://code.google.com/p/micolog /.

The current version is 0.5. I only select this blog program because micolog can be used to import XML data exported from WordPress. It has good compatibility and can be imported for articles and categories, and supports permanent links.

6. Install the micolog blog program.

1) Copy micolog to the Gae installation directory (you can change the name of the micolog directory, for example, watch-life) and modify the app. in the yaml file,Application: "", "Mlog" after it is changed to the name of the application you created on Gae. For example, I changed it to application: Watch-life.

2) Start-run-cmd, enter D:/program files/Google/google_appengine, and enter the command:Appcfg. py update watch-life/Enter the Gmail address and password as prompted, and the micolog blog program will be uploaded. Then you can access your blog on Gae:Http: // Application name .appspot.comFor example, my is: http://watch-life.appspot.com

7. Export WordPress XML data.
Log on to the background of your Wordpress blog and select:Tool + export, Click"Download Exported Files"Button.

8. Import WordPress XML data in the micolog blog.
1) log on to the blog program you just created on Gae. the login username and password are the same as those of your Gmail, because the application is the user service in Google API and integrates the Google user account.

2) Select"Set + import/export", Select to import the XML file (that is, the XML data file exported from WordPress), and click"Import"Button.

Note the following before importing:

1. If the imported XML file is large, the import will time out and fail. I first exported 1.8 MB of XML, but failed to import it. I thought it was a problem with the imported program. I divided the XML into N parts and imported them separately.

How to split and export XML files. The structure in the XML file is as follows:

xml version="1.0" encoding="UTF-8"?><rss version="2.0" ...><channel>
.....<wp:category>wp:category>...<wp:tag>wp:tag><item>item>..channel>rss>

WP: Category node indicates category

WP: Tag node indicates tag

Item node indicates the article

The WP: Tag nodes can be deleted because they are ignored during import.

Make the first XML file and import the classification (called the directory in micolog). Only the WP: Category node is retained.

, Similar to the following code:

xml version="1.0" encoding="UTF-8"?><rss version="2.0" ...><channel>.....<wp:category>wp:category>...channel>rss>

Then create the second XML file and keep only a part of the item nodes (it is better to keep it within 50 items, and the import will fail if it is more), similar to the following code:

xml version="1.0" encoding="UTF-8"?><rss version="2.0" ...><channel>.....<item>item>..channel>rss>

Next, let's create the third one. The method is similar, and so on.

2. Some item nodes in WordPress exported XML files have some problems (it is estimated that it is a WordPress bug). These problematic item nodes use image files as nodes, for example

<item>  <title>gohome.jpgtitle>  ..  item>

If such an item node exists, the import will be aborted. Therefore, you need to check whether such an item node exists when the import is aborted.

3. Permanent Link (permalink) does not support the category parameter. Therefore, you cannot set the permanent link to % (Category) S/Category (postnamedomains.html, only"% (Year) s, % (month) s, % (day) s, % (postname) s, % (post_id) S. The setting method is also different from that of WordPress.

After all the XML files are imported, the entire migration is completed.

Are you interested in trying it out. :-)

Link:

1. Google App Engine: http://appengine.google.com/

2, micolog blog program: http://code.google.com/p/micolog/downloads/list

3. Python: http://www.python.org

 

For more articles, see: Watch Xuan [http://www.watch-life.net/]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.