Most newbies experiment with their sites. In fact, I am not an exemption to it. Just like many others, I did some experimentation before where I almost destroyed my site because I completely messed up the codes which hindered me to login in my WordPress dashboard. Sometimes, it will disable the publishing capability of your website depending on the codes that you messed up.
You need to be very careful if you are working with the codes on php files. A deleted character especially the programming language will cause a great headache to you.
This tutorial will teach you how to fix WordPress Theme codes in your website if you messed it up.
So granted that you are on your WordPress dashboard and you are tempted to edit the php files, you went to edit options and you messed it up and the next thing that you know is that you can no longer log in to your dashboard, or you are getting errors, or you are having some publishing problem. But the biggest problem is, you don’t have a backup software or plugin.
Here’s the step by step solution:
1. Get your Theme. You should always have a raw backup of the theme that you are using. Open the php file of the one that you messed up. For example if you did some changes in the function.php, look for that file in your Theme files.
2. Login to your Cpanel and open File Manager.
3. Once inside the File Manager, look for the file that you changed.
4. Once you found it, click Edit.
5. Go back to the backup file of your theme, copy the code and paste it to the file that was in the File Manager in your Cpanel.
6. Click Save.
7. Do the same thing if you manually did some changes with other files.
This will enable you to restore the original code in those php files that you changed.