One of the great bonuses that WordPress Jetpack adds to your site is the simplicity of CSS customization. Jetpack brings in its own awesome CSS stylesheet editor.
You simply go to your
Your Custom CSS Can Be Reset
However, notice this one little warning at the top of the page:
Note: Custom CSS will be reset when changing themes.
This means that all your CSS customizations will be gone in two cases:
- when you change your theme — upload and activate a new one instead of the old one
- when you create and activate a child theme to your current theme
Restore Your WordPress Jetpack Custom CSS
Thankfully, your custom changes are not deleted.
There are actually two ways to restore your work on your CSS:
- Restore your custom CSS stylesheet from previous revisions.
- Restore your custom CSS from the SQL database.
Restore from Revision
WordPress saves all changes you make to your website, therefore no data is ever really lost.
Whenever you make changes to your posts, pages, or the CSS stylesheet editor and then click on the
So, when you change your theme and your CSS customizations get reset, all you need to do is locate the list of
Then click on the most current revision located at the top of the list.
And, finally, click on the
Restore from Database
Another way to restore your Jetpack-created CSS stylesheet is directly from the database.
It is a bit harder to do it this way, nevertheless it might come in handy sometimes.
For example, if you change themes and right after that you remove all the revisions from your WordPress blog, using a plugin such as Better Delete Revision.
Believe me, this occurrence is not that far-fetched…
In the above case, I hope that you back up your database regularly, because the CSS stylesheet has been totally wiped from your current database.
So, locate the most recent backup file of your WordPress SQL database.
If you use WP-DBManager or a similar solution to automatically create backups of your database on a regular basis, then all you need to do is go to
In case you are comfortable digging around in your backup database files manually, you don’t need to restore a previous version of your database at all.
What you can do is open the database file in a useful text editor such as Notepad++. The file should end with a
And in this file search for (
Simply select and copy out (
And ta-da, just like that, you’ve got your custom CSS settings back.
Liked this post?
Subscribe to our newsletter to receive early notification of new posts and deals: