# Migrate between Joomla! and WordPress

{% tabs %}
{% tab title="From Joomla! to WordPress" %}
To migrate AcyMailing data from Joomla! to WordPress, you first have to make sure **the latest version of AcyMailing is installed on the Joomla! website**, and that it is the **same edition** (Starter / Essential / Enterprise) you will use on WordPress. \
Note that you won't be able to migrate correctly the attachments added to your newsletters as the structure isn't the same.

1. Move the AcyMailing tables from the Joomla database to the WordPress one, and don't forget to replace the database prefix in the table names
2. [Install AcyMailing](https://docs.acymailing.com/setup/installation/install-acymailing) on the WordPress website if not already done then activate it
3. Replace all the content of the folder **WPsite/ wp-content/ plugins/ acymailing/ media/** by the one in **Joomlasite/ media/ com\_acym/**
4. Execute the following queries, and for each one of them don't forget to replace "wp1\_" by the real prefix of your database tables:

```
UPDATE `wp1_acym_mail` SET `body` = REPLACE(`body`, 'media/com_acym', 'wp-content/plugins/acymailing/media');
UPDATE `wp1_acym_configuration` SET `value` = REPLACE(`value`, 'media/com_acym/images/', 'wp-content/plugins/acymailing/media/images/');
UPDATE `wp1_acym_configuration` SET `value` = REPLACE(`value`, 'media/com_acym/', 'wp-content/uploads/acymailing/');
UPDATE `wp1_acym_user` SET `cms_id` = 0;
```

If you also changed the domain of your site, you will need to run this query:

```
UPDATE `wp1_acym_configuration` SET `value` = REPLACE(`value`, 'https://www.myolddomain.com', 'https://www.mynewdomain.com');
```

Of course, don't forget to replace "wp1\_" by the real prefix, "<https://www.myolddomain.com>" by your old domain and "<https://www.mynewdomain.com>" by your new domain.

5. In the "Security" tab of the configuration, advanced part, click the "Check database integrity" button.
6. If you own an Enterprise version and created a custom field based on a table from the database, you might want to update its configuration.
   {% endtab %}

{% tab title="From WordPress to Joomla!" %}
To migrate AcyMailing data from WordPress to Joomla!, you first have to make sure **the latest version of AcyMailing is installed on the WordPress website**, and that it is **the same edition** (Starter / Essential / Enterprise) you will use on Joomla! \
Note that you won't be able to migrate correctly the attachments added to your newsletters as the structure isn't the same.

1. Move the AcyMailing tables from the WordPress database to the Joomla one, and don't forget to replace the database prefix in the table names
2. [Install AcyMailing](https://docs.acymailing.com/setup/installation/install-acymailing) on the Joomla website if not already done
3. Replace all the content of the folder **Joomlasite/ media/ com\_acym/** by the one in **WPsite/ wp-content/ plugins/ acymailing/ media/**
4. Copy the content of the folder wp-content/uploads/acymailing/upload/ in the media/com\_acym/upload/ folder&#x20;
5. Execute the following queries, and for each one of them don't forget to replace "j\_" by the real prefix of your database tables:

```
UPDATE `j_acym_mail` SET `body` = REPLACE(`body`, 'wp-content/plugins/acymailing/media', 'media/com_acym');
UPDATE `j_acym_configuration` SET `value` = REPLACE(`value`, 'wp-content/plugins/acymailing/media/images/', 'media/com_acym/images/');
UPDATE `j_acym_configuration` SET `value` = REPLACE(`value`, 'wp-content/uploads/acymailing/', 'media/com_acym/');
UPDATE `j_acym_user` SET `cms_id` = 0;
```

If you also changed the domain of your site, you will need to run this query:

```
UPDATE `j_acym_configuration` SET `value` = REPLACE(`value`, 'https://www.myolddomain.com', 'https://www.mynewdomain.com');
```

Of course, don't forget to replace "j\_" by the real prefix, "<https://www.myolddomain.com>" by your old domain and "<https://www.mynewdomain.com>" by your new domain.

6. In the "Security" tab of the configuration, advanced part, click the "Check database integrity" button.
   {% endtab %}
   {% endtabs %}

In both cases, and only if you own a paid version of AcyMailing, you'll need to:

1. Click the "**Unlink my license**" button in the [License](https://docs.acymailing.com/setup/configuration/license) tab of the old website
2. **Attach the license** in the new website then **activate the "Automated tasks"** option
