Migration toolkit for moving a PrestaShop store to Webround.
Covers the full migration surface: catalog, variants, images, PDF attachments, tax zones, shipping, customers, promotions, and order history. Every script is idempotent — if a run is interrupted, re-running it picks up exactly where it left off without duplicating data, as long as you don't alter the behavior or delete the "data" folder.
- Node.js >= 20
- Access to the PrestaShop server via cPanel (SSH is not required)
- A Webround account with an active store (requires active subscription)
- API credentials from your Webround dashboard
wr-prestashop/
├── .env.example
├── package.json
└── src/
├── prestashop/
│ ├── export.php # runs on the PrestaShop server
│ └── import-dump.js # runs locally, converts JSON → SQLite
├── lib/
│ ├── api.js # Webround API client
│ ├── db.js # SQLite query helpers
│ └── state.js # idempotency state management
└── webround/
├── 01-tags-options.js
├── 02-collections.js
├── 03-products.js
├── 04-variants.js
├── 05-download-ps-images.js
├── 06-upload-images.js
├── 07-download-pdf.js
├── 08-upload-pdf.js
├── 09-tax-zone.js
├── 10-shipping.js
├── 11-customers.js
├── 12-promotions.js
└── 13-orders.js
1. Clone the repo and install dependencies
git clone https://github.com/WebroundAdmin/wr-prestashop-migration
cd wr-prestashop-migration
npm install2. Configure environment variables
cp .env.example .envOpen .env and fill in all values. See the Configuration section for details.
3. Create the local working directories
mkdir -p dump data/state data/images data/downloadThe PrestaShop database is not accessed directly. Instead, src/prestashop/export.php is uploaded to the server and executed once via browser or curl. It queries the database and writes the entire export to a JSON file outside public_html, so it is never publicly accessible.
Step 1: upload the script
Upload src/prestashop/export.php to your PrestaShop server using cPanel File Manager or FTP. Place it inside public_html or any web-accessible directory.
Before uploading, open the file and set your database credentials and output path:
$host = 'localhost';
$db = 'YOUR_DB_NAME';
$user = 'YOUR_DB_USER';
$pass = 'YOUR_DB_PASSWORD';
$output_path = '/home/YOUR_CPANEL_USER/exports/prestashop_export.json';
$prefix = 'ps_'; // change if your installation uses a different prefixThe output path must be outside public_html. On cPanel servers the typical pattern is /home/{username}/exports/.
Step 2: run the export
Call the script once from your browser or via curl:
curl https://your-store.com/export.phpThe response will be a small JSON object confirming how many tables were exported and listing any errors. The actual data is written to the output path you configured.
Step 3: download the JSON
Download the exported JSON file from the server using cPanel File Manager or FTP and place it at:
dump/prestashop_export.json
Step 4: delete the script from the server
Remove export.php from the server immediately after downloading the export. It contains database credentials and has no further use.
Step 5: convert to SQLite
npm run import-dumpThis reads dump/prestashop_export.json and produces dump/prestashop.sqlite, which all subsequent scripts read from.
Run the following scripts in order. Each one saves its output to data/state/ so subsequent steps can reference the created IDs.
Tags and options
Creates Webround tags, tag values, and options from PrestaShop attribute groups and manufacturers.
npm run tagsCollections
Migrates the full PrestaShop category tree to Webround collections, preserving hierarchy, visibility, and slug. Categories are processed level by level so parent IDs are always resolved before children are created. Each collection also gets a filter and a condition linked to a category tag value, which is how Webround replicates PrestaShop's category-based product filtering.
npm run collectionsProducts
Creates products in batch, links option values, and assigns category and brand tag values to each product.
npm run productsVariants
Creates one variant per PrestaShop combination (or a single variant for simple products), then links option values, prices, and stock levels. Also generates data/redirects.json with 301 redirect mappings from every legacy PrestaShop URL to its new Webround equivalent.
npm run variantsDownload product images
Downloads all product images from the legacy storefront to data/images/{psProductId}/{psImageId}.jpg. The script is resumable: interrupted runs continue from the last successful image.
npm run download-imagesUpload product images
Uploads the downloaded images to Webround and links them to the correct products and variants. Images shared by all variants of a product are attached at the product level; images specific to a subset of variants are attached at the variant level only.
npm run upload-imagesDownload PDF attachments
Downloads PDF attachments from the legacy storefront to data/download/. Set PS_ATTACHMENTS_BASE_URL in your .env to the base URL where PrestaShop serves attachments. Common patterns:
https://your-store.com/download
https://your-store.com/modules/blockwishlist/uploads
npm run download-pdfsUpload PDF attachments
Uploads the downloaded PDFs to Webround and links them to the corresponding products.
npm run upload-pdfsTax zones
Links each product to the correct Webround tax zone based on the PrestaShop tax rules group. Before running, open src/webround/09-tax-zone.js and update TAX_ZONE_MAP with the tax zone IDs from your Webround dashboard (Settings → Tax zones).
npm run tax-zonesShipping
Links a shipping zone and a shipping method to every product. Set WR_SHIPPING_ZONE_ID and WR_SHIPPING_METHOD_ID in your .env.
npm run shippingCustomers
Creates store customers on Webround. Accounts are deduplicated by email, keeping the oldest PrestaShop record when duplicates exist. Invalid or empty email addresses are skipped with a warning.
Note: passwords and billing addresses cannot be migrated via the public API without customer authenticated JWTs. Customers will need to reset their password on first login. Addresses can be re-entered by the customer from their account page or at order-time.
npm run customersPromotions
Migrates PrestaShop cart rules to Webround promotions, including discount type (percentage or fixed amount), usage limits, and date ranges.
npm run promotionsOrders
Migrates order history including order items and promotion usages. Payment and shipping statuses are mapped from PrestaShop order states via ORDER_STATE_MAP in src/webround/13-orders.js — extend this map if your store uses custom states.
npm run ordersAll configuration is done via environment variables. Copy .env.example to .env and fill in the values.
| Variable | Description |
|---|---|
WR_API_TOKEN |
Webround API token — generate it from your dashboard |
WR_STORE_ID |
Your Webround store ID |
USER_ID |
Your Webround user ID |
COMMERCE_API |
Commerce API base URL |
WR_CURRENCY_CODE |
Currency code for prices and promotions (default: EUR) |
WR_SHIPPING_ZONE_ID |
Shipping zone ID — find it under Settings → Shipping |
WR_SHIPPING_METHOD_ID |
Shipping method ID — find it under Settings → Shipping |
PS_DB_PREFIX |
PrestaShop table prefix (default: ps_) |
PS_LANG_ID |
Primary language ID for names and slugs (default: 2) |
PS_BASE_URL |
Legacy storefront base URL, used to download product images |
PS_ATTACHMENTS_BASE_URL |
Base URL for PDF attachments |
| Data | Reason |
|---|---|
| Customer passwords | Not accessible via the public Webround API |
| Customer addresses | Not accessible via the public Webround API |
| CMS pages and content | Out of scope — Webround uses a different content model |
| Email templates | Out of scope — reconfigure them in Webround after migration |
| Carrier and tax rule details | Mapped manually via TAX_ZONE_MAP and shipping env vars |
Every script writes its progress to data/state/ as JSON files. If a run is interrupted for any reason — network error, rate limit, API failure — simply re-run the same script and it will skip everything already completed and resume from the first unprocessed item.
Do not delete state files between runs unless you want to redo a step from scratch.
Built on Webround, an API-first e-commerce platform. All endpoints used by these scripts are publicly documented at docs.webround.com.