Backup, Recovery, Delete

All data (newsletter, subscribers, images, configurations, …) is stored exclusively in your blog (as files or data in the blog database). No data is copied to our servers.

Warning: the import and export procedures you find on administration side of Newsletter ARE NOT meant to do a backup and a restore. They are just options to import formatted data and export the subscribers.

What's inside

Backup and where data is stored

Newsletter stores all its data into the WP database. You can find it in two locations:

  • the wp_options table under the keys newsletter* (which is the standard WP way to store the plugin settings)
  • the wp_newsletter* tables

Note: we cannot grant someone else is not using the newsletter prefix on tables and options keys.

If you want to backup only the Newsletter settings and data you need to extract the Newsletter options from the wp_options table and dump all the wp_newsletter* tables. Of course, if your installation uses a different table prefix, you need to replace the wp_ prefix with your own.

The table prefix is defined inside your wp-config.php file.

If you developed custom themes or someone developed them for you, they should be stored inside the wp-content/extensions/newsletter folder. You should backup it as well.

Maybe you’re even interested in other two folders:

  • wp-content/logs/newsletter contains, if enabled, the plugin working logs
  • wp-content/uploads/newsletter contains the resized images used in newsletters to fix the layout

The Newsletter generated images are stored on wp-content/uploads/newsletter and are not referenced in the media database so there is no need to extract media data from the database. If you change the domain or remove the generated thumbnails images won’t be visible on old newsletters anymore.

Using backup plugins

Every backup plugin has its own behavior. You need to be sure the plugin you use is able to backup even tables not strictly part of WP, like the Newsletter ones (wp_newsletter*). This is a common consideration valid for all plugins which need custom tables.

Moving everything to a new site

So, you’re transferring the whole site to another provider.

If you use a backup and restore plugin and it backup even the Newsletter plugin custom tables, you should have no problems at all. When the backup and restore is made by a consultant, he should move all tables by default or ask you what you need to be transferred.

Transfer provided as a service by providers usually mirrors completely the site and the database without any possibility of data loss.

If you change the domain

If you change the domain, some problems will arise. The Newsletter plugin contains absolute references to images (that means the image name and the domain name) which probably won’t be fixed by who manages the migration. Absolute references are mandatory inside newsletters to be seen by your contacts.

Usually, it’s not a big problem since old newsletters could have already been deleted by your subscribers or not opened anymore.

Anyway, you should review all the Newsletter plugin configurations (especially the subscription, activation, and cancellation panels) to fix the links.

Restore/Move only the Newsletter plugin contents

If you need to restore or move only the Newsletter plugin contents (newsletters, contacts, …), you need to make a backup as explained and import it to the new site. Please note that backing up and restoring only a small set of options is not an easy task while restoring the full custom tables (wp_newsletter_*) is not a problem.

Example: backup and restore only your newsletters

Using the provider database management tool (usually phpMyAdmin), you need to identify in your “old” site the table wp_newsletter_emails. The wp_ part in the table name could be different in your installation, that part is called the “database table prefix”.

You should get a file, probably a plain text .sql file (but the compressed .zip format is usually selectable).

On your “new” site, check if the database prefix is the same as the old site. If not, you need later to rename the table.

Import the file using the database management tool on your “new” site and you’re done.

If the Newsletter plugin was already installed on the new site, you need to delete the wp_newsletter_emails before starting the import, or you can get an error. Of course, be sure the table is empty before deleting it!

If the database prefix is different on the “new” site, you can rename the table to match the correct prefix, always using the database management tool.

Deleting the Newsletter plugin

If you need to clean up totally your blog from the Newsletter plugin you should:

  • uninstall the plugin and all the addons from your blog plugin admin panel
  • use a database manager and drop every table named wp_newsletter* (wp_ is the prefix used by WP as default on not customized installations but it could be different in your blog)
  • remove all options in the wp_options table with the name newsletter or starting with the name newsletter_
  • remove the folder wp-content/logs/newsletter/
  • remove the folder wp-content/uploads/newsletter/
  • remove the folder wp-content/extensions/newsletter/

We do not remove all those information on uninstall. Data is yours and we cannot risk you losing years of subscribers, newsletters, and statistics just for an unwanted action!

Statistics tables (when they’re too big)

There are two statistics tables that can grow very quickly if you sent many newsletters to many subscribers:

  • wp_newsletter_stats
  • wp_newsletter_sent

Both tables are cleaned up when you delete a newsletter, removing the data related to that newsletter. So deleting old newsletters is a way to make them lighter.

If you prefer to preserve the newsletter content, both tables have a column named email_id that refers to the newsletter. So it’s possible to clean up the tables by deleting only the stats data (of course all reports for that newsletter won’t be available anymore).

An example of query is:

delete from wp_newsletter_stats where email_id=X


delete from wp_newsletter_sent where email_id=X

if possible do not clean up the wp_newsletter_sent table, since most of the report data is extracted from it.

The tables’ size

Checking the tables even after a deletion, may result in little change of their size. This is normal, even if the data is gone, the allocated space could be kept by the database.

In that case, a database optimization is needed, you can ask the provider to run those procedures.