WordPress: Backup your Database and Web File and Compress it.

This topic contains 0 replies, has 1 voice, and was last updated by  Caezar De Castro II 4 months, 2 weeks ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #9436

    Initially, I did search for the best plugins for WordPress that is safe, free, transparent, etc. Which really don’t exist. 😀 So I did an initial research as a start on Linux Server administration.

    Found out, that it is much easier, safer, faster, almost in all aspects. You can do that with 2 commands in Linux. Depending on the size of your public HTML it can take at least a minute or less, its really fast.

    On my experience, 1 GB of web files and 34MB of the database. The database only takes an instant complete in this case. But for my web files, it takes about half a minute.

    Now, enough talking let’s execute the command: Note that you need to navigate into your preferred folder on your server to isolate your backup from any other packages. Warning! DONT BACKUP ON YOUR SITE ROOT. 😀

    – First, you need to be in the folder you want.
    mysql -u root -p passwordhere -h localhost database_name > filename.sql

    – Now, we archive the public html. Public html is the folder that contains root files of your site, for your information. This compression also saved the permission data of directory and files.

    tar -pcvzf filename.tar.gz /var/www/public_html

    Now that database and root public html is now back up, your website is ready for a takedown. Just kidding! In the near future, I will make a new topic which can automate this command. But for now,  see Server Admin: Basic Manual for Performance and Security forum for more server administration and Easiest way of having a site is WordPress for other helpful tips and tutorials.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic. Login here