Backup website what your website got infected to pop-up/virus? might be no you want to change your website hosting services OR your website got penalized by google algorithms. however, you wanted to change your website domain if no than hosting services and need over all website data back. medias (image, videos) and all posts, category and more.
In this post you will gonna learn everything about website backup and how to recover website properly without losing anything.
Why Need Website Backup ?
In simple words, If your website is popular and you are ranked for so many keywords, getting traffic on your website suddenly your website hosting is not working properly and you wanted to change it without losing anything that's why website backup are necessary.
Reasons why website need backup
- You want to change website host
- Website got infected to viruses
- Website hosting is not compatible for your website
- Do you want to change hosting
- Changing website name due to long name
- Website has got google algorithms penalty
- DMCA issue
What websites can take backup ?
Every website is possible to backup and recover.
- WordPress
- Joomla
- php
- Any CMS
Website backup is very helpful for any website without backup you can't recover it, I have seen so many people taking money for backup and recover website but that's not good. you should easily backup your website data and recover it anytime.
Can we take backup of any website
Yes, you need only some knowledge about website management. so you can easily backup and recover not matter your website is based in any CMS (WordPress, joomla, concrete 5, PHP, HTML).
Website files are stored in file manager, files: (zip, php, html, js, jpeg, png) and more. but website data are stored in phpmyadmin (inside database as .sql) database includes: posts, meta data, category and more.
How To Take Website Backup
Before following know your website structure and about your CMS, almost websites are based in WordPress but some big websites are based in PHP custom CMS. so if you are using WordPress you may also use backup plugins in your WordPress website, but if need backup PHP or other website completely without losing anything Follow us, you can back-up OR recover any website using the same method no matter website is based in WordPress, PHP or any other CMS. do it your self follow these steps-
Open And Login Your Hosting Services
As I know most of people using Bluehost, Siteground, Hostgator & more. so now login your hosting services, If you don't know login or password than ask it to your developer also save it in your side too.
After login the hosting panel go to your active services to client area.
Now you can see inside the services your active websites so visit in your website (for which you want to take backup).
Go to your website.
Than you can see inside the website hosting "quick shortcuts" in bottom, now visit in the "file manager".
Visit in to File Manager.
How To Take Website Files Backup To Cpanel
As I said files are: images, videos (media) , scripts and more. without files you can't take backup and recover it (no matter what website they are). so now here we have to take first files backup to compress it in .zip learn here how...
After visit the File manager visit in Public_html OR htadocs
Some hosting websites using nginx server so they all has htadocs section where you can find all files of our website otherwise almost websites has public_html so now visit in it.
Now visit in public_html
Note: Before compressing the files check wp-config.php Or config.php and than note the database name and database user name because when we can download database so it can help us to identify your website database, learn more below.
This is wp-config.php - database nameSelect all files and Compress in .zip
First click on select all and than compress so there you can see formats example: zip, tar, gzip. select any in which format you need files backup. (zip recommend).
Click on "compress files" so all the files will convert in .zip
Now you can see .zip A file download it.
Click on file and than download it.
Website files is backup properly.
Now it's time to take database backup.
How To Take Website DataBase Backup
Without DB (database) you can't recover any website it's necessary. your all post's, admin login, category, images and everything are stored in database, once you download the SQL file (database) your overall website can be backup properly. learn how to take website backup with screenshot's.
Now Go to phpMyAdmin
Before you visit in the "file manager" now you have to visit in phpmyadmin to take website database backup.
You may also visit in phpmyadmin using cpanel however shortcuts are helpful. after visiting into php-my-admin it can be redirect you wait 10 seconds until it load.
phpmyadmin is logged
Here you select your website database which you have to take. note you can check your database name in wp-config in to your files backup.
Visit in your website database. it appear here database name you can check in wp-config.php!
After visit in to database name Go to > export.
Click on export and than at the bottom you can see "GO" click on it. so (.sql file) database will be download. now your website is completely backup. you should delete the website your website in Cpanel and re-built it using your backup. also you may change the domain name or hosting so for recovering your website you have to upload the files and import the database which you have backup-ed now.
How To Recover Website
You have to open all the things again in your other domain or same domain but in new hosting so for recovering all the data and everything (once you take backup than recovery is very easy). Follow these given instruction:
Note: If database is already created don't do these
Just import .sql database file in your database and change the user, database and password in config file of your script.
#1 - How to Recover files
- Open Your File manager > Public_html
- Now upload your files backup
- Extract the uploaded file (.zip)
#2 How to Recover Database
Here you need to create database first learn how to create new database for recovering and make live website again as newly.
How To Create Database
Open MySQL Database
Than..
Give any name to Database and click on create database
Now...
You have to create user for database
Give any name and set password than click on "create user" than...
Add user to database and give all permissions
Give permission
Done...
- Now Open phpmyadmin and created database.
- Go to import from the header line
- paste your backup .sql file (database)
If you are facing any issue than make your .htaccess default
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
Paste it in .htaccess if you are not able to see than go to options from header and click on show hidden files. or still you are not able to see than create a file with name .htaccess and paste this given code.
Thank You For Reading
Don't forget to share
You may also like: