Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Import/Export posts #24
If you have it on the installer it's still asking for an interaction and as david said it's not necessary for everyone.
It would make more sense to keep the installer as simple as possible and just have an import option on the back-end posts page.
"Create a new post" "Import posts"
I agree with @Simonclavey, however it would be best to have a simple xml import and export buttons in the metadata section. Understandably its awesome that we can now convert data from WordPress to Anchor, however Anchor needs to stay fresh and different. Having a WordPress import button will take it a step closer to "Another WordPress clone".
Sorry to harp on.
pushed a commit
Mar 8, 2013
Original issue: importing works, thanks to http://samhellawell.info/index.php/posts/wp2anchor; exporting can be a plugin. Sorted.
I've used wp2anchor to import my blog data from Wordpress. The import is done, but it seems that the text encoding is not the right one.
In the original .xml file, text is with Spanish characters, like in "sueños". But for some reason it seems that after that import characters look like this: "sueÃ±os".
If I write a new post, characters are OK.
Would you know how to fix this?
@javiercuello, in wp2anchor's import.php file, try adding this around line 187:
Add that directly after this line (line 186):
wp2anchor_log("Connected to the database: " . $mysqlInfo["database"]);
That may or may not fix your unicode import issues. I haven't tested that, so no promises. :)
I've kind of solved this directly replacing characters in my database. It would be great for someone to fix this wp2anchor for others having my same issues.
I've found other problems as well, concerning other things: importing from wordpress keeps some tags like the ones for < blockquotes >, < ul > and < em >. Ideally, it would be great to have some importing tool that convert this tags to the corresponding markdown.
So, I'm checking & fixing post by post, just to be sure all is OK.
Also, this import file uses almost the same information needed when installing Anchor CMS; so it would be useful to have an "import" field directly when installing anchor.
I'm just thinking out loud, but I think it's better to say this somewhere, and not keeping it for myself.
A way to import from Wordpress, be it directly from a Wordpress database dump, by connecting to the Wordpress database or by be able to import a XML file would be great.
I have tried to get wp2anchor to work but it falls a bit short.
With larger XML files (20+ megabytes) the import fails. In my case, PHP is configured to handle up to 512MB files and the tmp-storage directory is defined with proper access rights. The result of this is a bit hairy:
The import fails with this message:
"Connected to the database: xxxxxxxxxxx
All existing posts and categories are wiped and none are created."
Smaller XML (5-6MB) files work, but the import script deletes any data already present in the database rather than add to existing data in the database which makes it impossible to import a huge Wordpress site step by step.