If you are like me editing random files and moving files, you might have faced Fatal errors from wordpress. Well, all I did was reinstall the wordpress using old database. Before we begin, you need to backup your current files; importantly, I want you to have your wp-config.php just to save some time.
1. Get into your FTP and download all of your current wordpress files
2. Delete all of the WordPress files
3. Download the wordpress version that you had before (If you use different version of wordpress, there will be mismatch between the database and your wordpress. So, I suggest downloading the same version as the database, then, upgrade your wordpress if it’s working again.)
5. Upload all of the new wordpress files
4. Now, go to your website; the setup will pop up as shown below: Click “Create a Configuration File” and then “Proceed”
5. Now, the old file wp-config.php comes in handy because it has all information of your old database
6. Find these values: Database Name(DB_NAME), Database Username(DB_USER), Database Password(DB_PASSWORD), Database Host(DB_HOST), and Table Prefix($table_prefix)
7. Paste in above values into the according boxes without the single quotes
8. Viola! log in and start blogging again! Click “Run the install” and it will say you don’t need to install again. Then, “Log In”. Your username and passwords are the same as your old wordpress.
Now, you can look into your old files and upload what you need to your newly installed wordpress. Your theme might not be correctly setup, just upload your theme files to your theme folder.
Let’s say, for some reason, old wp-config.php isn’t available. You can obtain the required database information through your webhost and phpMySQL or whatever that you are using to manage MySQL. You will need to figure the table prefix yourself, so log in to phpMyAdmin or w/e. Expand the database name where you have your wordpress data. You will see the prefixes as shown below; in this case mine is ” wp_6io70p_”.
If you get your prefix mismatches, you won’t be able to see your old posts and such. WordPress will automatically create a new tables with the wrong prefix that you put in.