Les étapes à suivre pour importer ce fichier xml d’export à nouveau dans un WordPress.
WordPress
.xml
à importer puis ensuite cliquez sur OK
puis envoyer le fichier et l'importer
.envoyer
.vCe n’est qu’une façon de faire pratique et pragmatique pour déployer rapidement un site sous WordPress. On va servir de ce que l’on nomme volontiers la portabilité des données. Par exemple, imaginons que vous développiez le site sur une plate-forme différente de celle qui va héberger votre site en production. Pour illustrer notre propos, on va dire que :
http://projet1.dev.hecube.net
http://projet1.prod.hecube.net
Si vous reproduisez exactement l’arborescence de votre site de développement sur le site de production, notamment le contenu du répertoire /wp-content/uploads/
, vous pourrez changer ensuite à l’aide un trouver-remplacer dans votre éditeur favori (Dreamweaver, Textmate…) toutes les adresses commençant par http://projet1.dev.hecube.net
par http://projet1.prod.hecube.net
pour ensuite importer le fichier xml contenant le contenu de votre WordPress patiemment rentré sur l’espace de développement. C’est une méthode à la hache mais qui va vous faire économiser bien du temps et pâlit un des gros défauts de WordPress à savoir écrire en dur l’URL de base partout dans la base de données MySQL à laquelle il est adossé.
Une vue partielle du contenu d’un fichier d’export WordPress
<?xml version="1.0" encoding="UTF-8"?> <!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your blog. --> <!-- It contains information about your blog's posts, comments, and categories. --> <!-- You may use this file to transfer that content from one site to another. --> <!-- This file is not intended to serve as a complete backup of your blog. --> <!-- To import this information into a WordPress blog follow these steps. --> <!-- 1. Log in to that blog as an administrator. --> <!-- 2. Go to Tools: Import in the blog's admin panels (or Manage: Import in older versions of WordPress). --> <!-- 3. Choose "WordPress" from the list. --> <!-- 4. Upload this file using the form provided on that page. --> <!-- 5. You will first be asked to map the authors in this export file to users --> <!-- on the blog. For each author, you may choose to map to an --> <!-- existing user on the blog or to create a new user --> <!-- 6. WordPress will then import each of the posts, comments, and categories --> <!-- contained in this file into your blog --> <rss version="2.0" xmlns:excerpt="http://wordpress.org/export/1.0/excerpt/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wp="http://wordpress.org/export/1.0/" > <channel> <title>wp_install</title> <link>http://127.0.0.1/wordpress_2_9_1/site</link> <description>Just another WordPress weblog</description> <pubDate>Sun, 21 Feb 2010 16:04:17 +0000</pubDate> <generator>http://wordpress.org/?v=2.9.2</generator> <language>en</language> <wp:wxr_version>1.0</wp:wxr_version> <wp:base_site_url>http://127.0.0.1/wordpress_2_9_1/site</wp:base_site_url> <wp:base_blog_url>http://127.0.0.1/wordpress_2_9_1/site</wp:base_blog_url> <wp:category><wp:category_nicename>accueil</wp:category_nicename><wp:category_parent></wp:category_parent><wp:cat_name><![CDATA[accueil]]></wp:cat_name><wp:category_description><![CDATA[only used on homepage]]></wp:category_description></wp:category> <wp:category><wp:category_nicename>divers</wp:category_nicename><wp:category_parent></wp:category_parent><wp:cat_name><![CDATA[divers]]></wp:cat_name></wp:category> <wp:category><wp:category_nicename>cinema</wp:category_nicename><wp:category_parent></wp:category_parent><wp:cat_name><![CDATA[Cinéma]]></wp:cat_name></wp:category> <wp:category><wp:category_nicename>films</wp:category_nicename><wp:category_parent></wp:category_parent><wp:cat_name><![CDATA[Films]]></wp:cat_name></wp:category> <wp:category><wp:category_nicename>homeslideshow</wp:category_nicename><wp:category_parent></wp:category_parent><wp:cat_name><![CDATA[HomeSlideshow]]></wp:cat_name></wp:category> <wp:category><wp:category_nicename>destinations</wp:category_nicename><wp:category_parent></wp:category_parent><wp:cat_name><![CDATA[Destinations]]></wp:cat_name></wp:category> <wp:category><wp:category_nicename>news</wp:category_nicename><wp:category_parent></wp:category_parent><wp:cat_name><![CDATA[News]]></wp:cat_name></wp:category> <wp:tag><wp:tag_slug>adipiscing</wp:tag_slug><wp:tag_name><![CDATA[adipiscing]]></wp:tag_name></wp:tag> <wp:tag><wp:tag_slug>amet</wp:tag_slug><wp:tag_name><![CDATA[amet]]></wp:tag_name></wp:tag> <wp:tag><wp:tag_slug>aristides-de-sousa-mendes</wp:tag_slug><wp:tag_name><![CDATA[aristides de sousa mendes]]></wp:tag_name></wp:tag> <!-- to be continued --> |
Une vidéo en anglais sur l’import et l’export sous WordPress