• So I recently tried adding a plugin that broke the code for my website, and after three days I was finally able to access the site via FTP (FileZilla) and get it back up and running.

    But now I’ve got a problem. I downloaded the theme the site had been using again and uploaded it, and while the information that was on the site is still there, all of the custom formatting is gone, as it is back to the original default settings for that theme. There is no backup file of the original website layout, so my question is: Is there a way to restore the original look/formatting of the website with the theme, or do I have to do all of that over again?

Viewing 5 replies - 1 through 5 (of 5 total)
  • When you “customized” it, did you make changes to the theme files itself (like styles.css)? You should be aware that changing theme files is not recommended. If you ever have to update or restore the theme, then those changes will be lost. The recommended way of making changes to a theme is to create a child theme. Then, you would make the changes to your child theme’s style.css file, and modify copies of the theme’s .php files (if needed).

    Most major hosts will do daily backups. You may be able to work with your host’s support desk and have them restore the theme folder back to an earlier date. For example, if the theme you are using is Twenty Fourteen, then you can see if they will restore the /wp-content/themes/twentyfourteen folder back to a date where you know your changes were still around.

    Thread Starter CaitlynHannon

    (@caitlynhannon)

    Okay, I talked with my host and I was able to get a backup file of the wp-content folder from before I installed the bad plugin, but now I don’t know what to do from there. I still can’t just pick the theme I originally had because when I do a live preview, it shows the same parse error screen that I had when I broke the code in that theme. Any suggestions?

    Did restoring the backup bring back the formatting? I assume you’ve already deactivated/removed the bad plugin. What is the parse error saying exactly? And does it only come up during a live preview, i.e., on your regular site, does it look OK?

    Thread Starter CaitlynHannon

    (@caitlynhannon)

    This is the message that comes up in the live preview:

    Parse error: syntax error, unexpected ‘;’ in /home/content/34/7128034/html/wp-content/themes/PersonalFinance/functions.php on line 187

    I don’t want to try adding that theme back because then it will break the site again (as it did multiple times when I tried to add it back before). My host said that the MySQl database might also need to be restored, but that only does backups of the site manually, of which I have not done since the site was created back in January. He said to try using a database repair plugin, which I downloaded, but now it is saying that I need to move the plugin and make the backup folder writable. (Keep in mind that I still don’t know if this plugin will even be able to let me restore the database from a week ago since I hadn’t already done that manually.)

    So PersonalFinance is the theme that you are currently using? And it only happens during theme preview, your regular visitors don’t see the error message?

    Did you make any changes to the functions.php file? I doubt that your MySQL database needs to be touched. If you go into functions.php, what does line 187 say?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘My theme went back to the original format.’ is closed to new replies.