If you have old classifieds website and want to move your ads to Classibase powered website then we have feature for importing ads using XML file format. Ad importing with XML will import ads and create all necessary categories, locations, custom fields if they are not already created. Before importing ads try it on test server first and check if any custom fields, categories, locations messed up. If everything worked as you expected then repeat process on live site.
Before starting to import ads:
- Please try importing ads on test site. If everything goes ok then repeat process on live site.
- Backup your sites images located in /user-content/uploads/adpics/
- Backup your database using tools provided by your hosting server
- Make sure that you have access to source server’s database
- Ad importing will import all ads read from XML, if you want to load only some categories then code your XML generation files accordingly.
To start importing follow these steps:
- Navigate to “Tools”->”Import data” on admin panel
- At the bottom in “Import ads” area put URL for xml file. XML file should be formatted like displayed in example above URL field. XML generation explained below.
- Click “Import” button. After import starts log consisting of actions performed will be displayed below button.
There are cases when ad will not be imported:
- If user email is not valid ad will not be imported
- If ad description already exists in classibase database then ad will not be imported
How to generate XML file for old classifieds website ads?
Xml file should be formatted like displayed on “Tools”->”Import data” page. We wrote example PHP file that generates import XML file for zxero classifieds script.
Here are instructions how to use export XML file (source server: server from which you want to copy ads; destination server: server where you want to copy ads, it is where classibase script runs.):
- Download PHP files for generating XML. These files will work only with xzero classifieds script. To make it work with other classifieds script you have to completely change export_xml_xzero.php file to fit your source database structure.
- Extract files to your computer.
- Edit export_xml_xzero.php file. Define following variables with your source server values: DB_NAME, DB_HOST, DB_USERNAME, DB_PASSWORD, IMAGE_URL_PREFIX for your old site.
- Upload extracted files to your source server.
- Test xml file by navigating http://yoursite.com/export_xml_xzero.php address from your browser.
- Then navigate to http://yoursite.com/export_xml_xzero.php?page=2 address from your browser. This is second page with next 10 ads. Classibase will import ads by 10 until all ads imported. This is done to prevent server overloads.
- If xml renders correctly then you are ready to import ads from source server.
XML file format
<?xml version="1.0" encoding="UTF-8" ?> <rss version="2.0"> <channel> <title>SCRIPT_NAME export</title> <description>export of existing system data</description> <item> <title>Ad title here</title> <link/> <description>Ad description here</description> <pubDate>Sat, 11 Aug 2012 16:50:31 +0000</pubDate> <verified>1</verified> <enabled>1</enabled> <email>firstname.lastname@example.org</email> <showemail>show</showemail> <ip>127.0.0.1</ip> <location> <val>Russia</val> <val>Moscow</val> </location> <category> <val>Stuff for Sale</val> <val>Household, furniture</val> </category> <image>http://test.com/adpics/5026713813f6ba03b46a1a9c1.jpg</image> <image>http://test.com/adpics/50267137e8b39181a2a9f1601.jpg</image> <image>http://test.com/adpics/502671380c92e7d9e98b2f1d7.jpg</image> </item> ... other items below. keep it at most 10 records. per page. paginate adding ?page=2 after url </channel> </rss>
Additional example xml files for importing:
- import-example-checkbox - Example for importing an ad with checkbox custom values
Update 28.03.2014: URL structure and permalinks will not be transferred when you import ads from your old website. All traffic that will come using old URLs will be redirected to home page. Following image of website visitor statistics show that traffic recovered in 5 month and tripled after a year when classifieds website switched from other old script to ClassiBase.
Related terms: how to import classified ads, import classifieds from other sites, importing classified ads into my site