skip to Main Content

I recently restored a WordPress website backup using Hostinger’s hosting platform. After completing the restoration process, I noticed that all my custom CSS added in the WordPress Additional CSS section was missing. This caused the website’s appearance to change significantly and no longer match its original design.

The issue was unexpected, as I assumed the restoration process would preserve all customizations, including CSS.

Initially, I assumed the WordPress backup restoration process on Hostinger would automatically include all customizations, including the CSS added in the Additional CSS section of the WordPress Customizer. However, after the restoration, I found the custom CSS missing, and the website’s design didn’t look as it did before.

I tried reviewing the restored files and checking if the CSS was saved elsewhere, but I couldn’t find it. I also expected Hostinger’s backup process to preserve this data without requiring additional steps.

2

Answers


  1. Chosen as BEST ANSWER

    While searching for a solution, I found a simple and effective method to recover the lost CSS, and I wanted to share the step-by-step guide with you:

    1. Log in to your Hostinger account.

    2. Navigate to your desired website.

    3. Access the Databases section and open phpMyAdmin.

    4. Once inside phpMyAdmin, select your website's database.

    5. Go to the Query tab and run the following SQL query:

      SELECT * FROM wp_posts WHERE post_type = 'custom_css'

    6. Click Submit Query, and you’ll see a row (or more) containing the custom CSS data you had before.

    7. Click the Edit button, copy the CSS code, and paste it back into the Additional CSS section of your WordPress site.

    This approach worked seamlessly for me, and I hope it helps anyone facing the same issue.


  2. Check Custom CSS Data in the Database If you have database access via phpMyAdmin or a similar tool:

    Search the wp_options table:
    Open phpMyAdmin in Hostinger.

    Run this query to check for custom CSS:

    SELECT * FROM wp_options WHERE option_name LIKE '%theme_mods_%';
    

    Look for a row with CSS stored under the custom_css_post_id or a similar key.
    If the data is found, it might be recoverable.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search