Restore deleted CSS in Plugin Options
-
Hi,
While editing custom CSS for a table in Plugin Options, I accidentally deleted CSS for some of the other tables for which I had custom CSS. Is there a way to restore the CSS I had in Plugin Options?
Thanks,
Sanjeev
-
Do you happen to have a site backup made recently or a copy of the CSS you where using in?
TablePress > Plugin Options
Hi Luke,
I had a copy of the custom CSS for all the tables in a text editor earlier this morning and closed it without saving and then this happened 🙁
It is a possibility that there is backup of the site. I will check with the IT guy. Assuming the site had a backup, should I ask for the MySQL database from my IT guy? If yes, I am guessing I will be able to open the MySQL file in a text editor and retrieve the custom CSS. Is that correct?
Thanks,
SanjeevDepends on what type of backup there is.
You might be able to use that backup to create a new dev site or import into a local dev site.
Then you could go into the same plugin options on the dev site and copy out the CSS.
I use Gist for saving custom CSS and code, it works very well. So you can find any of your previous code snippets and CSS at a later time.
Thanks. I have asked the IT guys to tell me when the last backup was taken. Will it be easier to lookup the custom CSS in MySQL database file or in one of the files within the TablePress plugin folder as compared to re-creating a dev site?
Does the custom CSS from TablePress plugin get saved in MySQL database or in Plugins folder in wp-content directory?
It would be stored in the DB, not sure if it is written out as well to a CSS file for the plugin custom CSS changes.
Hi,
thanks for your post, and sorry for the trouble.
Your best bet would indeed be a mySQL backup here. It should even be possible to find the relevant code in the backup file using a text editor (by simply searching for something like
.tablepress).You could also check if the Google Cache or the Internet Archive’s Wayback Machine have mirrored your site recently. That should also allow getting the CSS back from their mirror site.
Regards,
TobiasThanks Luke. Waiting for IT guy to get back to me. The site does have a backup in .tar.gz format. Possibly includes the database as well.
Thanks Tobias for your input. I was not aware of Google Cache and Archive’s Wayback Machine and will check them out. I will update the thread when I am able to restore the custom CSS, if it helps others.
Hi,
yes, if that .tar.gz file contains e.g. an .sql file, that should be the database dump.
I hope that you can find something in those caches or the backup!
Regards,
TobiasTobias,
I tried looking for 5-6 webpages on my site at Internet Archive’s Wayback Machine (IAWM) but none of them were archived by IAWM. I did receive the MySQL database file and opened it in Notepad++ and was able to find the custom CSS code in it. The custom CSS code was in continuous line so started cleaning it up first (curly brackets and semi-colons, etc. in proper lines).
After a few lines of code, I tried copy-pasting the entire code from the MySQL database file to the Plugin Options text area in your plugin and the text area fixed it automatically in proper lines, which saved me a ton of time (564 lines of code in all). Needless to say I was so happy about not having to clean up the code 🙂
Thank you for all your help and for the wonderful plugin and prompt support.
Best wishes,
SanjeevHi,
no problem, you are very welcome! 🙂 Good to hear that this helped!
Best wishes,
TobiasP.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!
The topic ‘Restore deleted CSS in Plugin Options’ is closed to new replies.