login to your server via SSH.<\/a><\/p>\nNext, navigate to your WordPress root directory. For example, it could be located at: \/var\/www\/html\/wordpress\/.<\/p>\n
To make a full archived backup of your whole WordPress site, you can execute the following command:<\/p>\n
tar -cpzf wp-backup.tar.gz \/var\/www\/html\/wordpress\/<\/pre>\nAdditionally, you will also need to make a backup of your database. Your WordPress database stores all the information about your website like posts, pages, comments, user accounts, plugin configurations etc.<\/p>\n
To make a full backup of your database you can use the following command, followed by your database password:<\/p>\n
mysqldump -u db_user -p db_name > wp_db_backup.sql<\/pre>\nMake sure to change the wp-user and wp-database accordingly with your actual database user and database name.<\/p>\n
If you are not sure of your database information that is currently connected to your WordPress site, you can check the wp-config.php file inside your WordPress root directory and look for the following lines:<\/p>\n
define('DB_NAME', 'db_name');\r\ndefine('DB_USER', 'db_user'); \r\ndefine('DB_PASSWORD', 'db_password')<\/pre>\nNow we have a full backup of our WordPress site and we can move on to fix the 403 Forbidden error in WordPress we are getting.<\/p>\n
<\/span>2. Fixing 403 Forbidden Error in WordPress Caused by Plugins<\/span><\/h2>\n<\/p>\n
One of the reasons for this error could be a faulty plugin. The easiest way to identify if the 403 Forbidden error is caused by a plugin is to temporarily disable all the plugins you have on your WordPress site.<\/p>\n
If the error is gone after we disable all the plugins, then we can confirm it is indeed a plugin causing this error. We can then start turning the plugins back on, one at a time, and keep checking when the error appears again, so we can identify the exact plugin that is causing 403 forbidden error.<\/p>\n