by Dave | activecampaign
Active Campaign backup. This is one of those things people don’t usually think about until they need it. And at that point, usually it’s a little bit too late. So here’s a way to do backups of your Active Campaign contacts automatically out and requires a little work on your side on your site, you’ll need to create a my SQL database and install a PHP script. And then in your Active Campaign account, you’re going to set up an automation that has a web hook that talks to that PHP script. When somebody signs up to any list and the biggie is it’s automatic. So let’s dive right in. Now you may or may not know this but you can simply download your contacts by going to contacts
and export that will automatically generate a CSV file with all your contacts. I encourage you do that on a regular basis.
But if you don’t, here’s a way to do it. So that automatically adds people as they added to your account so let’s start on your web server you’re gonna need to create a database and you’re gonna need to install a script and configure it. So let’s do the my SQL database first.
So I’m going to create one call backup. Let’s just call it Active Campaign. Since I’ve already done go ahead and create that, you want to create a user, user password. Do not use password as a password but I am for this, go ahead and do that and then finally give permissions to that newly created database user to access the newly created database so right here Add User database go ahead and click on Add. Give it all privileges and then make those changes. And then you can go back. And you’re going to need those credentials that you just created.
So just keep that in mind. And there’s the database and users over there. So you want to create a script called backup dot php on your web server. Here it is. And inside here, you want to do a little bit of a configuration, especially the database stuff. And the instructions are right here if you need it, but pasting or type in the database name, the database user, which in this case was user and then the database password and the database host which is typically local host you may need to check with your provider and after that there’s nothing to do inside this script.
We do need to actually install do an installation so you you’re going to want to visit the script that you just installed on your domain, followed by a question mark install. So if I do that, it says success, it’s created the appropriate tables. And one thing I’m going to do just for show Intel is to let you look at the database. And again, this is just for backup purposes. So if I go in here, I go to this database, there’s the contacts table that is created. And right now there’s nothing in it.
So now what we need to do is go back to Active Campaign. So I want to go ahead and create an automation from scratch and I’m going to do when somebody subscribes to a list so immediately they’re backed up. So any list I’m going to just run at once if I ran it multiple times, no big deal because the way the script is set up it will only add them at their unique so I’m going to go ahead and say add start and where to go to contacts actually conditions and workflow web hook.
Now this is where I paste in that link. And I do not want to have the question mark install there. So go ahead and do that. Go ahead and in this automation, give it a name and make it active. So now going forward, when anybody subscribes to any of your list, they’re going to their information is going to get past to that backup dot php script, which will then put it into a database. So let’s take a look at that. Now what I’m going to do is simply add them manually to that automation. So right now inside the database, and if I click on browse, there’s nothing in there. If I add them to the backup automation, we can see that they finished and started that automatically. So now if I go here and click on there’s that information about that contacts.
So that’s how do you separate automation to automatically backup your Active Campaign contacts.