Category: WordPress

MySQL Dump and Restore 0

MySQL Backup, Files Transfer Using scp, Restore Database

Do you ever move 2GB or 20GB files and databases from one linux host to another? I do.

If you have SSH/secure shell access to your both hosts then this is the way to do it super fast:

  • Backup your database using this command line:
    mysqldump --opt -h localhost -u dbusername -ppassword databasename > backup.sql
  • Move your public_html files using scp command:
    scp public_html.tgz username@my.server.ip.address.com:/home/username/mydomain.com/
    And then uncompress it
  • Move your backup.sql to the new host:
    scp backup.sql username@my.server.ip.address.com:/home/username/mydomain.com/
  • Restore your database using this command in the new host:
    mysql -h localhost -u dbusername -ppassword databasename < backup.sql
  • ... read more

    Download failed. Could not open handle for fopen() 2

    Cara Mengatasi “An error occurred while updating Akismet: Download failed. Could not open handle for fopen() to /tmp/akismet.tmp”

    Kalau kamu pernah dapat pesan ini waktu sedang update plugin atau themes di wordpress,

    An error occurred while updating Akismet: Download failed. Could not open handle for fopen() to /tmp/akismet.tmp

    Itu artinya kamu perlu mengubah/menambahkan sesuatu di file wp-config.php.

    Tambahkan kode ini di file wp-config.php

    define('WP_TEMP_DIR',ABSPATH.'wp-content/uploads/');

    Save dan coba lagi proses update, seharusnya semuanya berjalan lancar. 🙂

    Download failed. Could not open handle for fopen()