From the course: WordPress: WP-CLI

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Exporting, importing, search, and replace

Exporting, importing, search, and replace - WordPress Tutorial

From the course: WordPress: WP-CLI

Start my 1-month free trial

Exporting, importing, search, and replace

- [Instructor] Moving a database from one environment to another can be a big pain. One that's made easier by WPCLI. Here you'll learn how to export, import, and update vital database information. We are going to take our test site here and copy it over to a fresh installation of WordPress. Let's start with the export. So you can see, I have both terminal windows up here, one for the WPCLI site and one for the fresh site over here. In the WPCLI site, I'm going to run the command WP DB export and then I need to give this file a name. This is going to dump all of the SQL into a file. So I'll call this WPCLI.SQL, And then if I do LS, I could see that there is a new file here called WPCLI.SQL. Now we'll need to download this to our local computer to use it on a different site. So for that, we'll go over to Finder, and I'm going to download this to my public folder. So I'll right click, press option, and copy this folder as…

Contents