Theme' CSS Editor- Content Disapperead

I had a very strange issue just happen. I was editing my CSS content in the X-Pro Content CSS Editor, when I got a “low-battery” warning on my laptop. I immediately saved my changes and plugged in the laptop. I got an error message “Changes not Saved”. I tried a few times, but I could not save the change. I refreshed my browser and to my surprise, all of the content in the CSS editor was gone! I’ve lost many hours of work (500+ lines of code).

I downloaded a backup of the entire website from the host server and I’d like to be able to restore only the CSS code that I lost for the Home Page. I was writing the code in a specific X-Pro page (not the Global CSS Editor). Can you possibly help me find the correct file to restore?

Hi @mcaravaglia,

Thank you for reaching out to us. You probably can get it back with the WordPress Revisions feature:

In WordPress page editor, go to Settings > Revisions, browser your revisions and restore to the last revision that had your CSS content, this should bring back all of your CSS content but if you have made any content changes during those revisions then you will also loose the content as well but you’ll get your CSS back so here what you can do is copy all of your CSS and then revert back to the previous revision, this way the content will be back and you’ll have CSS too so this might work very well.

Another way of doing it is if you have the previous backups, simply create a staging site and restore the backup (that had your CSS code) on the staging site. You can then copy all the changes from staging and paste them in your live site.

Hope this helps!

Thank you. All’s good now.

You are most welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.