How can I fix the unsecure_base_url on my Magento installation?

How can I fix the unsecure_base_url on my Magento installation?

August 3, 2026 · Illustrated author avatarBy Stefan Bogdanescu
How can I fix the unsecure_base_url on my Magento installation?

Fixing the Unsecure Base URL Issue on Your Magento Installation

Hello! I understand your frustration with the unsecure_base_url issue that’s causing styling problems on your Magento site. Let’s troubleshoot this step-by-step so we can get everything back to normal.

Understanding the Problem: Incorrect Base URLs

When you changed the base_url in the config, it affected all the URLs used by Magento, including the ones for media files and skins. This is why your website lost its styling - the CSS and JavaScript files couldn’t be found or loaded properly because their paths were incorrect.

The issue lies with these entries in your database:

web/unsecure/base_link_url   http://www.northwalesdoorworld.co.uk/
web/unsecure/base_skin_url   http://www.northwalesdoorworld.co.uk/skin/
web/unsecure/base_media_url  http://www.northwalesdoorworld.co.uk/media/
web/unsecure/base_js_url    http://www.northwalesdoorworld.co.uk/js/

Notice how the last part of each URL is incorrect. It should match your actual Magento installation path, which seems to be / by default.

Step 1: Verify Your Magento Directory

Before we proceed, make sure you know where your Magento files are located on the server. By default, a fresh install puts it at the root level (i.e., in the public_html or www folder), but this can vary depending on how your hosting is set up.

In most cases, you should see folders like app, media, skin, and js within your Magento directory.

Step 2: Update the Base URLs

Now let’s update those base URL entries to match your actual installation path:

  1. Log in to phpMyAdmin.
  2. Select your database on the left sidebar.
  3. Find the core_config_data table.
  4. Search for web/unsecure/base_* entries and edit them one by one.

Change the URLs to match your site’s protocol (http or https) followed by your domain name without any trailing slashes:

Make sure to not include the / at the end of each URL.

Step 3: Flush Magento Cache (if necessary)

After updating the URLs, you might need to flush the Magento cache. You can do this in two ways:

  1. From the Admin Panel:

    • Navigate to System > Cache Management.
    • Select all cache types and click “Flush Magento Cache.”
  2. Via SSH or terminal:

    • Run php bin/magento cache:flush for a single command.

Step 4: Clear Browser Cache

Sometimes, your browser might still be caching old CSS and JavaScript files. To ensure you see the changes:

  • Force a hard refresh on your website (Ctrl+Shift+R on Chrome/Firefox or Command+Shift+R on Safari).
  • Alternatively, clear your browser cache.

What to Do If It Still Doesn’t Work

If updating the URLs doesn’t resolve the issue, there might be additional factors at play:

  1. Check if your .htaccess file is intact and correctly configured.
  2. Verify that all necessary Magento files (like index.php) are present in their correct locations.

Remember, Magento’s base URL configuration can sometimes be tricky to handle manually. If you’re still having trouble, consider using a tool like [Laravel Company’s Magento Migration Service][laravel-company-migration] for more complex migrations or updates.

Conclusion

Updating the unsecure_base_url entries in your database should fix the styling issues on your Magento site. Always remember to update all four base URL entries (base_link_url, base_skin_url, base_media_url, and base_js_url) whenever you change your domain name or install path.

Don’t hesitate to reach out if you need further assistance. We’re here to help!

Database Themes Configuration Errors

Our network