Knowledgebase

Site works but images and links point to the old domain Print

  • domain, database, woocommerce, wordpress, plugins, https, php, permalinks, caching, troubleshooting
  • 0

URLs still referencing the previous address.

WHAT IT MEANS

Absolute URLs stored in the database still name the old domain.

THE FIX

Run a database search and replace from the old URL to the new one.

Use a tool that handles serialised data. A plain SQL replace corrupts serialised values and breaks widget and plugin settings.

IN WORDPRESS

A search-replace plugin, or WP-CLI, both handle serialisation correctly.

WHAT TO REPLACE

The full old URL including scheme: http://old-domain.com to https://new-domain.com

Also check for protocol-relative and bare domain references.

AFTER REPLACING

Purge all caches Re-save permalinks Check a sample of pages, posts and products

IN CONFIGURATION FILES

Some applications store the site URL in a file rather than the database. Check configuration.php, .env or equivalent.

FOR ABSOLUTE PATHS

Joomla and others store the server file path. That must be corrected as well, or the site fails with path errors.

CHECKING WHAT REMAINS

Search the database for the old domain after replacing. Anything remaining is in a place the tool did not reach.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot