As we get started working in WordPress it will be best if we snag an exact copy of the live database to work with locally. Some websites have things like phpMyAdmin installed which provide a GUI for things like exporting a database, but the CSS-Tricks database is just too big for that. So instead we SSH into the site and do a mysqldump from the command line to get a copy of it. We dump it outside the web root so nobody can access it. Then we log in with FTP and download it.

I end up having to google this all the time, so I'll just list them here:

Dumping a database

mysqldump -u username -p databasename > dumpfilename.sql

Importing a database

mysql -u username -p databasename < dumpfilename.sql


  1. Bert
    Permalink to comment#

    Video #078 is missing !?

    Gr. Bert

  2. Seth Hall
    Permalink to comment#

    Yes, video #078 is missing.

  3. Josh Fabean
    Permalink to comment#

    Chris, git on Coda it’s the bomb!

  4. CWSpear
    Permalink to comment#

    Adminer is a great lightweight tool for remote database management. It’s only 1 file (unlike the nearly 900 files that PHPMyAdmin has). In all fairness, if you want the non-default theme, you’d need a 2nd file.

    It’s very fast, supports inline editing and is easier to use than PHPMyAdmin. Its biggest boon though is its portability. I can remote into a client’s FTP and upload a couple files and have database access, and easily delete when I’m done, etc. I still prefer it over PHPMyAdmin though, even when I have that option.

    I don’t think having a large database should be an issue for downloading, but it may be for uploading depending on your server settings. Adminer has an option where you can rename your SQL file adminer.sql (and optionally .tar.gz it) and place it next to your Adminer file on the server and it can handle virtually any size file that way (just “upload from server”).

    • Nelson Hereveri
      Permalink to comment#

      Thanks for Adminer tip. I use command line, because is simple than other tools. This helpme to improve my Joel Test.

    Permalink to comment#

    I greatly enjoyed the ‘Sweaty Balls?’ Gold Bond Alerts site in the Coda site previews baha.

Leave a Comment

Posting Code

We highly encourage you to post problematic HTML/CSS/JavaScript over on CodePen and include the link in your post. It's much easier to see, understand, and help with when you do that.

Markdown is supported, so you can write inline code like `<div>this</div>` or multiline blocks of code in triple backtick fences like this:

  function example() {
    element.innerHTML = "<div>code</div>";

We have a pretty good* newsletter.