WordPress Backup • WordPress Help

 Secure Data "title =" Secure Data "width =" 425 "height =" 282 "class =" aligncenter size-full wp-image -6605 "/> </a></p>
<p> Well, we already know that you have to backup regularly, do not you? What happens is that sometimes we forget it, but imagine that you are carrying something and you do not have a recent backup What does it hurt? </p>
<p> Mainly, as we have said several times, we must <a href= make backup – preferably – of two things:

  • the database, which is where the configurations and content
  • the folder wp-content where are the plugins, the themes and the files that you have uploaded.

If you have access to phpMyAdmin on your server you can make backups very easily PhpMyAdmin has an Export function that makes a copy of the entire database, a table, whatever you want.

Yes, if your base data is very large then you should use another backup tool, usually available on the server side, if you have access to systems like CPanel or Plesk.

On the other hand, for the more advanced, you can use SSH, which is already I have spoken, and once you control it greatly facilitates backups, and other actions.

To backup with SSH you just have to access with your data (usually FTP data), move in command line to the folder where you want to make backup and, once there, execute this command:

mysqldump -opt -u dbuser -p dbname> dbname.sql

This replaces the dbuser and dbname with yours. Now all that remains is to compress the backup:

gzip -c dbname.sql> dbname.sql.gz

Once this is done, there is less, but you can also do the previous two steps in just one:

mysqldump -opt -u dbuser -p dbname> dbname.sql | gzip> ficheroresultante.sql.gz

Now you have done the backup of the database. If you did the previous steps well you will have it in a zip and in SQL

The next thing is to compress the folder wp-content :

zip -r wp-content-backup-Dec-3.zip wp-content /

This puts everything in wp-content inside a zip. The modifier '- r' is precisely the one we use to "collect" all the subfolders.

Then we can upload the zip to the backup folder, for example:

mv wp-content -backup-Dec-3.zip ../backups

If we do this from time to time, and do not worry about the commands, you can copy them and paste them in the command window, you will have backup of your site safely.

NOTICE : This publication is from two years ago or more. If it's a code or a plugin it might not work in the latest versions of WordPress, and if it's a news story it might be obsolete. Then do not say we have not warned you.

Loading …

That may also help you:

How to install WordPress from the Shell

Installing WordPress is easy but when you do in the usual way it's a really long process, where you have to interact with several windows, applications, you know: downloads the latest version, decompress it on your computer, open the ftp client to upload it, create the database in your hosting panel, edit the wp- file config.php with a text editor, and then return to the browser to start the installation of the system.

But there is a faster method in which you do not leave a single window, and if you hurry me, it's more effective. All you need is access to your server from Shell SSH and from the window of Command Terminal you can do everything. Also, you know that the terminal remembers the commands so it's not that complicated. What's more, if you use the Mac OS X Terminal you can even drag and drop the commands from this same tutorial to streamline the process.

Let's go …

1. Connect by SSH

First of all is open the command interface . If you are in Mac OS X simply type "terminal" in Spotlight and run the application, if you are in Windows better download the application Putty . Once the terminal window is open, connect to your server using the SSH protocol :

Change " user " by your SSH username and " mydomain.com " by the domain name of the server to which you want to connect or , if you prefer, the IP address assigned to the server. Press the ENTER key and you will be asked for the password. Enter your SSH password and press ENTER again (you will not see anything on the screen while typing). If you have not made a mistake in any data you will be in a moment inside your remote server.

Note: the user data usually coincide with your FTP username and the password will be provided by your hosting provider or it will be the same one with which you connect to your hosting panel, not to the CPanel or Plesk but to your account in the provider. If you have questions, ask your provider.

The next thing you have to do is go to the folder where your hosting is associated with the domain, where you will install WordPress. Check the absolute path of your server which, in many cases, is usually something like this:

The above route is typical in a server managed with Plesk (the one I use in Mediatemple) if you are going to install WordPress in the public folder. However, this route may vary so check this information in your accommodation panel.

Once you have entered the route, press ENTER and it will show you the ' prompt '. To make sure you're where you wanted to, type the following command:

2. WordPress Download

Once we are sure we have placed in the appropriate folder it is time to download the latest version of WordPress in that directory. Execute the following command to download the file: