Answer: Back up both parts of a WordPress site, the files and the database, using a backup plugin, your hosting control panel, or manually with FTP and a database export.
A WordPress site has two parts: files (WordPress core, themes, plugins, uploaded media in wp-content, and wp-config.php) and the MySQL database (posts, pages, comments, users, settings). A full backup needs both.
- Backup plugin (easiest): install a plugin such as UpdraftPlus, BackWPup or Duplicator. Choose files + database, set a schedule (daily or weekly) and store copies off-site (Google Drive, Dropbox, Amazon S3). It can also restore the site.
- Hosting control panel: many hosts offer automatic backups, or a "Backup" tool in cPanel that downloads a full or partial backup (home directory and databases).
- Manual backup:
- Files: connect with FTP/SFTP (for example FileZilla) or the File Manager, and download the whole WordPress folder (at least
wp-content and wp-config.php). - Database: open phpMyAdmin, select the site's database, click Export and save the
.sql file (or use mysqldump or WP-CLI wp db export).
Good practice: take a backup before updating WordPress, themes or plugins, keep several copies in different places, and occasionally test that a backup can actually be restored.