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. User Avatar
    Permalink to comment#

    Video #078 is missing !?

    Gr. Bert

  2. User Avatar
    Seth Hall
    Permalink to comment#

    Yes, video #078 is missing.

  3. User Avatar
    Josh Fabean
    Permalink to comment#

    Chris, git on Coda it’s the bomb!

  4. User Avatar
    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”).

    • User Avatar
      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.

  5. User Avatar
    Permalink to comment#

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

Leave a Comment

Posting Code!

You may write comments in Markdown. This makes code easy to post, as you can write inline code like `<div>this</div>` or multiline blocks of code in triple backtick fences (```) with double new lines before and after.

Code of Conduct

Absolutely anyone is welcome to submit a comment here. But not all comments will be posted. Think of it like writing a letter to the editor. All submitted comments will be read, but not all published. Published comments will be on-topic, helpful, and further the discussion or debate.

Want to tell us something privately?

Feel free to use our contact form. That's a great place to let us know about typos or anything off-topic.