Delete campaigns command

Delete campaigns command

Deleting old campaigns, that you don't need anymore, will free up a lot of disk space.
This in turn will result in a faster application because there will be less data AppMail has to go through in order to complete operations.
The delete-campaigns command will help you delete older sent campaigns, for example, campaigns older than 6 months.

The command has the following signature:

command: /usr/bin/php -q {ABSOLUTE_PATH_TO}/apps/console/console.php delete-campaigns

And accepts following arguments:

--time=EXPRESSION where EXPRESSION can be any expression parsable by php's strtotime function. ie: --time="-6 months".
--type=campaign type (accepts 'regular', 'autoresponder'). ie: --type="regular".

So a valid call to this command will look like:

/usr/bin/php /var/www/html/apps/console/console.php delete-campaigns --time="-6 months" --type="regular" --verbose=1

The above will delete the regular campaigns older than 6 months.

The command is interactive, it will ask you some questions and show you how many campaigns it will delete.

    • Related Articles

    • Debug send-campaigns command

      Starting with version 1.3.5, the cron job command that sends campaigns (send-campaigns) has been modified so that it will help debugging sending speed. In order to make use of this functionality, you should have ssh access to your server so that you ...
    • Delete inactive subscribers command

      Starting with version 1.3.7.1 we introduced the delete-inactive-subscribers command which will delete subscribers that did not open a campaign or did not click a link in a campaign in a given period of time. The command has the following signature: ...
    • Archive campaigns delivery logs

      Since AppMail stores a lot of data, there is one table in particular that will grow very much, that is, the table that store delivery info for each subscriber, its name is `campaign_delivery_log`. This can be problematic for small servers since ...
    • Process regular campaigns and autoresponders separately

      By default, AppMail will process both, regular campaigns and autoresponders in the same time. This is good for small installations that don’t have multiple campaigns that are sending at once. If the “Campaigns at once” setting from Backend -> ...
    • Clear cache command

      The way AppMail works in most cases where performance is important, is that it fetches the data from the database once, then it will store it in cache and serve it from there for as much as possible. This allows AppMail to perform fast because data ...