How to fix Disorganized collapsed WordPress Website after migrating it

How to fix Disorganized collapsed WordPress

Migrating a WordPress website can sometimes lead to a distorted, collapsed, or disorganized homepage. This is especially common when moving a site from a subdirectory or local development environment to the root domain. In this guide, I’ll walk you through how to rectify this issue effectively.

This fix is ideal for:

  • Websites previously built in a subdirectory: E.g., https://www.exampledomain.com/demo moved to https://www.exampledomain.com.
  • Websites developed offline: E.g., websites designed on WAMP or XAMPP and then uploaded to the main domain.

Before the Fix

The Fix: Step-by-Step

Step 1: Update URLs in the WordPress Database

The most common cause of this issue is incorrect URLs in the database. To fix this:

  1. Access the WordPress Database: Log in to your hosting control panel (e.g., cPanel) and open phpMyAdmin.
  2. Find the Options Table: Navigate to the table called options. This table is typically prefixed with your database prefix, such as wpcg_options.
  3. Update URLs:
    • Locate the following rows:
      • siteurl
      • home
    • Edit these rows to reflect the correct domain you have migrated to. For example:
      • From: http://localhost/demo
      • To: https://www.exampledomain.com

Step 2: Clear Browser and WordPress Cache

Cached data can sometimes prevent updates from appearing. Clear your browser cache and, if you use caching plugins, clear your WordPress cache as well.


Step 3: Regenerate Permalinks

  • Log in to your WordPress dashboard.
  • Go to Settings > Permalinks.
  • Without changing any settings, click Save Changes.
    This refreshes your permalinks and resolves broken link issues.

After the Fix

Once you’ve updated the URLs and cleared your cache, your website should load correctly

Leave a Comment

Your email address will not be published. Required fields are marked *