FG SPIP to WordPress


This plugin migrates categories, articles, news and images from SPIP to WordPress.

It has been tested with SPIP versions 1.8, 1.9, 2.0, 3.0, 3.1 and 3.2 and the latest version of WordPress. It is compatible with multisite installations.

Major features include:

  • migrates categories
  • migrates articles
  • migrates news
  • migrates featured images
  • converts SPIP shortcodes
  • compatible with the MySQL and SQLite SPIP database drivers

No need to subscribe to an external web site.

Premium version

The Premium version includes these extra features:

  • migrates authors with their passwords
  • migrates keywords
  • migrates forum as WordPress comments
  • SEO: redirects articles, news, tags and authors URLs
  • partial imports : ability to skip some parts of the import: categories, articles, news, users, forum
  • ability to run the import by WP CLI

The Premium version can be purchased on: https://www.fredericgilles.net/fg-spip-to-wordpress/


The Premium version allows the use of add-ons that enhance functionality:

  • documents migration
  • multilingual content to WPML
  • metas SEO data migration

These modules can be purchased on: https://www.fredericgilles.net/fg-spip-to-wordpress/


  • English (default)
  • French (fr_FR)
  • other can be translated


  • Parameters screen


  1. Install the plugin in the Admin => Plugins menu => Add New => Upload => Select the zip file => Install Now
  2. Activate Plugin in the Admin => Plugins Menu
  3. Run the importer in Tools > Import > SPIP
  4. Configure the plugin settings. You can find the SPIP database parameters in the SPIP file config/connect.php
    spip_connect_db($host,”,$user,$password,$database,’mysql’, ‘spip’,”);


I get the message: “[fg-spip-to-wp] Couldn’t connect to the SPIP database. Please check your parameters. And be sure the WordPress server can access the SPIP database. SQLSTATE[28000] [1045] Access denied for user ‘xxx’@’localhost’ (using password: YES)”

  • First verify your login and password to your SPIP database.
  • If SPIP and WordPress are not installed on the same host, you can do this:
  • export the SPIP database to a SQL file (with phpMyAdmin for example)
  • import this SQL file on the same database as WordPress
  • run the migration by using WordPress database credentials (host, user, password, database) instead of the SPIP ones in the plugin settings.

The migration stops and I get the message: “Fatal error: Allowed memory size of XXXXXX bytes exhausted” or I get the message: “Internal server error”

  • First, deactivate all the WordPress plugins except the ones used for the migration
  • You can run the migration again. It will continue where it stopped.
  • You can add: define('WP_MEMORY_LIMIT', '512M'); in your wp-config.php file to increase the memory allowed by WordPress
  • You can also increase the memory limit in php.ini if you have write access to this file (ie: memory_limit = 1G).

I get a blank screen and the import seems to be stopped

  • Same as above

The media are not imported

  • Check the URL field that you filled in the plugin settings. It must be your SPIP home page URL and must start with http://

The media are not imported and I get the error message: “Warning: copy() [function.copy]: URL file-access is disabled in the server configuration”

  • The PHP directive “Allow URL fopen” must be turned on in php.ini to copy the medias. If your remote host doesn’t allow this directive, you will have to do the migration on localhost.

I get the message: “Fatal error: Class ‘PDO’ not found”

  • PDO and PDO_MySQL libraries are needed. You must enable them in php.ini on the WordPress host.
    Or on Ubuntu:
    sudo php5enmod pdo
    sudo service apache2 reload

I get this error: PHP Fatal error: Undefined class constant ‘MYSQL_ATTR_INIT_COMMAND’

  • You have to enable PDO_MySQL in php.ini on the WordPress host. That means uncomment the line extension=pdo_mysql.so in php.ini

Does the migration process modify the SPIP site it migrates from?

  • No, it only reads the SPIP database.

I get this error: Erreur !: SQLSTATE[HY000] [1193] Unknown system variable ‘NAMES’

  • It comes from MySQL 4.0. It will work if you move your database to MySQL 5.0 before running the migration.

I get this error “Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM”

  • You must use at least PHP 5.3 on your WordPress site.

I get this error: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

  • It is a compatibility issue with your version of MySQL.
    You can read this post to fix it: http://forumsarchive.laravel.io/viewtopic.php?id=8667

None image get transferred into the WordPress uploads folder. I’m using Xampp on Windows.

  • Xampp puts the htdocs in the applications folder which is write protected. You need to move the htdocs to a writeable folder.

Do I need to keep the plugin activated after the migration?

  • No

Is there a log file to show the information from the import?

  • Yes. First you must put these lines in wp-config.php:
    define(‘WP_DEBUG’, true);
    define(‘WP_DEBUG_LOG’, true);
    And the messages will be logged to wp-content/debug.log.

The plugin imports data with wrong encoded characters

  • This is usually due to a wrong encoding in the original database. You must re-encode your SPIP database before running the import. The procedure is described on: http://contrib.spip.net/Convertir-un-site-SPIP-3-en-utf-8-avec-le-plugin (in French).

Don’t hesitate to let a comment on the forum or to report bugs if you found some.


Hezîran 25, 2024
Speedy and top support ! We had apparently an import bug. It was fixed in a new released in a matter of a few hours… Amazing !
Tebax 29, 2023
Without any prior knowledge of SPIP, I’ve used the SPIP to Wordpress plug-in to successfully convert a larger, content heavy website. Not only did Frédéric and his team supported and advised me along the way, they also went above and beyond to help me out with a very specific use case. A customer service all of us should be inspired by. Highly recommended. Thanks again.
Çile 26, 2023
The plugin works fine with small sites, but with big ones you need to be careful. There will be times when it will tell you that the import is complete without reaching 100% and with the counters not reaching the total number of files and posts. In others, an error will appear that will make you think that things have failed. The problem is that nowhere does it warn you that in both cases the import continues and if you delete the content to start over, you will have a problem. You also can’t stop the import if for some reason you decide you don’t want to continue or you discover that there is something wrong and you have to start over. And even if the import ends, the bar will not reach 100%, so you will have to find out by comparing original and imported publications. The premium plugin doesn’t work better. It is the only option to import SPIP sites to WP but more reliable information on the process or greater control over the import would not be bad.
Tîrmeh 26, 2022
Nous avions besoin de migrer un site avec une très grande base de données et Frédéric Gilles a été super. Il a développé quelques add-ons sur mesure pour répondre à nos besoins. Merci!
Nîsan 27, 2021
Très bon produit. Simple et excellent support lorsque ce fut un peu nécessaire, non pas à cause du produit mais de mes faibles connaissances. Je recommande sans aucune crainte ni restriction. Et Merci à nouveau à F. Gilles.
Read all 28 reviews

Contributors & Developers

“FG SPIP to WordPress” is open source software. The following people have contributed to this plugin.


Translate “FG SPIP to WordPress” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • Fixed: On SPIP 2, the categories were not imported


  • New: Optimize the replacement of internal links
  • Tested with WordPress 6.5.4


  • New: Modify the links in the excerpt


  • Tested with WordPress 6.5.3


  • New: Display the image description in the image caption
  • Fixed: Images whose description contains several lines were not imported


  • New: Replace the tag by


* New: Import images stored on Google Drive
* Fixed: The duplicate categories that have a parent with a higher ID were not imported
* Fixed: Files whose filename is longer than 255 characters were not imported
* Tested with WordPress 6.5.2


  • Fixed: Translations missing
  • Tested with WordPress 6.5


  • New: Run the plugin during the hook “plugins_loaded”
  • Tweak: Replace rand() by wp_rand()


  • Fixed: Rename the log file with a random name to avoid a Sensitive Data Exposure
  • Fixed: Unsafe SQL calls
  • Tweak: Replace file_get_contents() by wp_remote_get()
  • Tweak: Replace file_get_contents() + json_decode() by wp_json_file_decode()
  • Tweak: Replace json_encode() by wp_json_encode()
  • Tweak: Remove the deprecated argument of get_terms() and wp_count_terms()


  • Tested with WordPress 6.4.3


  • New: Modify the internal links that match the urls table
  • Fixed: Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated


  • New: Don’t import the images in duplicate
  • Fixed: Plugin log can be deleted with a CSRF
  • Fixed: Found 3 elements with non-unique id #fgs2wp_nonce
  • Tested with WordPress 6.4.2


  • Tested with WordPress 6.4.1


  • Tested with WordPress 6.3.2


  • Fixed: Articles with bad encoding were not re-encoded (regression from 3.21.3)
  • Tested with WordPress 6.3.1


  • Fixed: Articles with multiple encodings were not imported


  • Tested with WordPress 6.3


  • Tested with WordPress 6.2.2


  • Fixed: Notice: Undefined offset
  • Fixed: Warning: count(): Parameter must be an array or an object that implements Countable


  • New: Compatibility with PHP 8.2
  • Tested with WordPress 6.2


  • New: Import the shortcodes
  • Fixed: Logs displayed “IMPORT COMPLETED” after pressing the “Stop” button


  • Fixed: The option “Import the media with duplicate names” didn’t work anymore (regression from 3.16.0). So wrong images were imported.
  • Tested with WordPress 6.1.1


  • Tweak: Shorten the filenames if the option “Import the media with duplicate names” is selected
  • Tested with WordPress 6.1


  • New: Replace the SPIP non breaking space shortcodes
  • New: Add the WordPress path in the Debug Info
  • Tested with WordPress 6.0


  • New: Don’t delete the theme’s customizations (WP 5.9) when removing all WordPress content
  • Tested with WordPress 5.9


  • Fixed: Notice: Trying to access array offset on value of type bool
  • Tested with WordPress 5.8.3


  • Tweak: Refactoring


  • Tweak: Add the method get_imported_spip_posts()
  • Tested with WordPress 5.8.2


  • Fixed: Some variables were not escaped before displaying
  • Tested with WordPress 5.8


  • Fixed: Cache not cleaned for the taxonomies other than categories
  • Tested with WordPress 5.7.2


  • New: Replace the heading shortcodes (h2, h3, h4, h5, h6) provided by the SPIP plugin “Enluminures typographiques”
  • Tested with WordPress 5.7.1


  • Tweak: Remove the “wp_insert_post” hook that consumes a lot of CPU and memory
  • Fixed: Articles containing wrong encoded characters were not imported
  • Fixed: [ERROR] Invalid date.
  • Tested with WordPress 5.7


  • Fixed: Notice: Object of class WP_Error could not be converted to int
  • Fixed: Notice: Undefined index: date


  • Fixed: Error: The fg-spip-to-wp importer is invalid or is not installed.
  • Fixed: Wrong encoded characters


  • Fixed: Wrong encoded characters in the title and alt tags of the images
  • Fixed: Remove the HTML tags inside the title and alt tags of the images because it breaks the front-end


  • Fixed: Empty content or title for articles with bad encoded characters
  • Fixed: Wrong encoded characters


  • Fixed: Empty content for articles with bad encoded characters
  • Tested with WordPress 5.6.1


  • Fixed: Content with multiple charsets was not imported


  • Tested with WordPress 5.6


  • New: Ability to change the default import timeout by adding define('IMPORT_TIMEOUT', 7200); in the wp-config.php file
  • Fixed: Character ” not displayed in the settings


  • Fixed: Wrong featured image if the article has both a logo and attached images
  • Fixed: Progress bar at 0% if the site is in https and the WordPress general settings are in http
  • Tested with WordPress 5.5.3


  • Compatible with WordPress 5.5
  • New: Make the max_allowed_packet human readable
  • Change: Set the default media timeout to 20 seconds
  • Fixed: Timezone was not the same between the start and the end time in the logs


  • Fixed: /IMG duplicated in the images path


  • Fixed: /IMG duplicated in the images path


  • New: Display the PHP errors in the logs


  • New: Add an help tab
  • New: Add a debug info tab


  • New: Add the hooks “fgs2wp_get_articles_sql” and “fgs2wp_get_news_sql”
  • Tested with WordPress 5.4.2


  • New: Add the hook “fgs2wp_process_content”


  • Fixed: Logs were not displayed
  • Fixed: Wrong shortcode replacement for footnotes containing a hyperlink
  • Tested with WordPress 5.4


  • Fixed: Logs were not displayed due to mod_security


  • Fixed: Notice: date_default_timezone_set(): Timezone ID ” is invalid


  • Fixed: Some internal links containing anchors were badly modified
  • Tested with WordPress 5.3.2


  • New: Embed the YouTube videos
  • Fixed: Deprecated: The each() function is deprecated
  • Tested with WordPress 5.3.1


  • Fixed: Logs were not displayed if the URL is wrong in the WordPress general settings


  • New: Download the media even if they are redirected
  • Tested with WordPress 5.2.3


  • Fixed: External links pointing to another SPIP web site were considered as internal links
  • Tested with WordPress 5.2.2


  • Tested with WordPress 5.2.1


  • New: Compatible with the SQLite SPIP database driver
  • Tested with WordPress 5.1.1


  • Fixed: Images not imported if the images directory is not defined in the SPIP meta
  • Tested with WordPress 5.0.3


  • New: Generate the audio and video meta data (ID3 tag, featured image)
  • Tested with WordPress 5.0


  • New: Remove the numbers that may prefix the post titles for all versions of SPIP
  • Fixed: Notice: Undefined offset: 3


  • New: shortcode replaced
  • Fixed: Dashes at the beginning of a row were removed
  • Tested with WordPress 4.9.8


  • New: Import the image captions in the post content
  • New: Import the image descriptions in the media library


  • New: Modify the SPIP shortcodes like [->art99] and [->br99]
  • New: Modify the internal links like breveXX.html
  • Tested with SPIP 3.2
  • Tested with WordPress 4.9.7


  • Fixed: The “chapo” was not re-encoded properly


  • New: Re-encode properly the data if they have a bad encoding in SPIP
  • Tested with WordPress 4.9.6


  • Fixed: Fix the wrong encoding characters in the news title
  • Tweak: Use WP_IMPORTING
  • Tested with WordPress 4.9.4


  • Fixed: Articles containing the “” character in the title were not imported
  • Tested with WordPress 4.9.1


  • New: Add the “fgs2wp_pre_import_categories” hook
  • Tested with WordPress 4.9


  • Fixed: The import hanged if the SPIP database contains the “Ì” character


  • New: Add some hooks for the WPML module


  • Fixed: Some databases may be imported with a wrong encoding
  • Fixed: Sanitize the file names with spaces


  • New: Fix the bad encoded titles coming from old SPIP versions


  • New: Check if the Premium version or add-ons are needed
  • Tested with WordPress 4.8.2


  • Fixed: Security cross-site scripting (XSS) vulnerability in the Ajax importer

= 2.22.1=
* Fixed: Notice: unserialize()
* Tested with WordPress 4.8.1


  • New: Import the image caption in the media attachment page
  • Tweak: Code refactoring


  • New: Modify internal links in drafts
  • New: Modify internal links like article12.html or spip.php?article12 or spip.php?page=article&id_article=12


  • New: Block the import if the URL field or the root directory are empty and if the media are not skipped
  • New: Add error messages and information


  • New: Add the percentage in the progress bar
  • New: Display the progress and the log when returning to the import page
  • Change: Restyling the progress bar
  • Fixed: Typo – replace “complete” by “completed”
  • Tested with WordPress 4.8


  • New: Replace the SPIP shortcodes like [->http://www.spip.net]
  • New: Modify the internal category links shortcodes like [->rub1]


  • Tested with WordPress 4.7.3


  • New: Import the shortcodes


  • Tested with WordPress 4.7.2


  • Fixed: Images not imported on some servers
  • Tested with WordPress 4.7.1


  • Fixed: Fatal error: Call to undefined function entites_html()
  • Tweak: Code refactoring


  • New: Convert the SPIP table shortcodes to HTML tables
  • Fixed: Existing images attached to imported posts were removed when deleting the imported data
  • Tested with WordPress 4.7


  • New: Allow the medias that return any 2XX code, and not only 200
  • New: Decode the HTML entities in the media filenames before downloading them
  • Fixed: Images and documents not replaced in the chapo


  • New: Convert the SPIP shortcode “_ ” to a line break


  • New: Replace multi-levels ordered and unordered lists shortcodes
  • Fixed: Wrong progress bar color


  • Fixed: Wrong encoding with some databases


  • Fixed: The progress bar didn’t move during the first import
  • Fixed: The log window was empty during the first import


  • Fixed: The “IMPORT COMPLETE” message was still displayed when the import was run again


  • Fixed: The images protected by a user agent protection were not imported


  • Fixed: Database passwords containing “<” were not accepted


  • Fixed: In SPIP 1.x, some articles, news and categories were not imported due to their encoding in a LONGBLOB field
  • Fixed: Categories with duplicate names were not imported


  • New: Compatibility with SPIP 1.8


  • New: Authorize the connections to Web sites that use invalid SSL certificates
  • Tweak: If the import is blocked, stop sending AJAX requests


  • New: Option to delete only the new imported data


  • Tweak: Change the visibility of function get_status()


  • New: Compatible with SPIP 1.9
  • New: Display the number of data found in the SPIP database before importing


  • Fixed: Wrong number of comments displayed
  • Tested with WordPress 4.6.1


  • Tested with WordPress 4.6


  • Tweak: Code refactoring


  • Fixed: The news date was always the current day


  • Fixed: Display an error message when the process hangs
  • Tweak: Increase the speed of counting the terms


  • New: Add an option to import the medias from a local directory
  • New: Replace the tags by
  • New: Guess the SPIP version even if the database is wrongly encoded
  • New: Sanitize the wrong dates
  • Tested with WordPress 4.5.3


  • New: Prevent the import of duplicate posts
  • FAQ updated


  • New: Run the import in AJAX
  • New: Add a progress bar
  • New: Add a logger frame to see the logs in real time
  • New: Ability to stop the import
  • New: Compatible with PHP 7
  • Tested with WordPress 4.5.2


  • Tested with WordPress 4.5
  • Compatible with SPIP 3.1


  • New: Process the SPIP anchors like [anchor<-]
  • New: Process the SPIP shortcodes -* (unordered list) and -# (ordered list)


  • New: Process the SPIP shortcodes like [anchor_text->img]


  • Fixed: Paragraphs line breaks were removed


  • New: Add a link when we choose “Import introduction in the content”
  • Fixed: Don’t add an empty div is the excerpt is empty


  • Tested with WordPress 4.4.2


  • Fixed: Encoding issue of the texte field


  • New: Remove the IDs from the begining of the articles and categories titles
  • Fixed: Encoding issue of the texte field
  • Fixed: The import last indefinitely due to the encoding issue
  • Tested with WordPress 4.4.1


  • Fixed: Fatal error: Call to undefined function add_term_meta()


  • Tweak: Use the WordPress 4.4 term metas


  • Tested with WordPress 4.4


  • New: Convert the SPIP shortcodes <img>, <doc> and <emb>


  • New: Add a link to the FAQ in the connection error message


  • New: Code refactoring
  • New: Update the plugin description


  • New: Add a screen shot
  • New: Add an help screen


  • Initial version