Is it possible to re-install wordpress on hosting without losing any data at all?. Yes, you do that. With a good script structure, making wordpress very possible to be reinstalled without you having to lose data.
You no longer need to create a new website from scratch, you only need to reinstall wordpress and replace important files related to your previous website data. One of the reasons for re-installing wordpress core is because the main wordpress script is broken.
Damage to the main script (core wordpress) can be caused by malware attacks, script plugin errors until the core is affected, and so on. If you have to make improvements to the error script, it will certainly be difficult, especially for those of you who are not very good at coding.
Before you start re-installing wordpress core, then make sure to backup and save the following files to your local computer. Because if you lose these files, you have to create a new website. REMEMBER !!! make sure to backup and download the following files properly:
1 What Files Should I Backup?
Again, make sure you back up the following files correctly, don't let them back up and save.
- WP-CONTENT folder
- WP-CONFIG.PHP file
- DATABASE files
To do the backup you already understand huh?. If not, then I will continue with how to easily backup all the files.
# Backup Folder Wp-Content & Wp-Config.php
– First, login to cpanel and look for the file manager menu
– Second, find your wordpress website folder. Because my website files folder is in the public_html folder, then wp-content and wp-config.php in that folder.
– Third, please block wp-content & wp-config.php, then right click and compress it to .zip.
– Fourth, download and save the compressed .zip file to your local computer.
# Database backup
– First, know the name of your wordpress website database by clicking view or edit on the wp-config.php file
– Second, go to the phpmyadmin menu in the cpanel and click the name of your wordpress website database.
- Third, click the "export" menu at the top to start downloading the mysql website backup database.
After everything is backed up properly, then next you can directly install your wordpress website.
2 Reinstall WordPress Without Losing Data
In re-installing wordpress, you can go through Softaculous and install it directly, or you can download the wordpress core script first. On this occasion I will discuss the install by re-downloading the wordpress core.
– First, please download the wordpress core according to your needs and adjust the previous wordpress version. Download core wordpress via the following link: https://wordpress.org/download/releases/
– Second, upload the downloaded wordpress core .zip file to the website folder in the cpanel file manager and wait for the process to complete. Then go back to the file manager, if the .zip file doesn't appear, it can be reloaded (top reload button).
– Third, delete the old wordpress files, except the WP-CONTENT folder and the WP-CONFIG.PHP file. If you delete all files, then you have to upload the wp-content & wp-config.php backup folder earlier.
So what is left in the file manager is only the wordpress core .zip file, wp-content folder and the old wp-config.php file.
– Fourth, please extract the wordpress core .zip file that you uploaded to the file manager earlier.
- Fifth, after extracting you will find a new folder called "wordpress", please enter the wordpress folder to transfer the new wordpress core file.
– Sixth, move the new wordpress core file to the main folder of your website. For those who don't move the wp-content folder and the wp-config.php file only.
Now please check again with your website access. If the previous problem was due to a damaged core, then surely your website can be accessed properly again