migrating WordPress from one subdomain to another (styles are always lost)
-
Hello Community,
I have following issue – whenever I migrate the site from https://dev.example.com (development site) to https://www.example.com (production site) I always run into problems with the styling (Appearance – Themese – Customize).
Basically everything outside “Site Identity” is lost – colors, configuration such as which pages and posts will be full width and which will be with “widgets”.
I’m not posting this into a particular theme support as I don’t think it’s theme specific – I was migrating three different themes (one free and two paid) and it was always the same problem.
How I do the migration?
1) I download the whole website structure via FTP.
2) I download MySQL database dump.
3) I use findandreplace (dot) io to search for string dev.example.com and recursively replace references of all files to https://www.example.com (usually almost nothing to replace)
4) I open the MySQL dump with notepad and replace any references to dev.example.com to https://www.example.com (usually 100s of changes)
5) I upload the recursively updated site and upload the fixed SQL dump to https://www.example.comThe site is restored successfully – all the links work (nothing is linking to old development site) and everything is pretty much fine unfortunately the styling is lost and has to be manually re-created – basically checking the old site and the new site – side by side copy/pasting any additional code or ie. codes of different colors for fonts and backgrounds. Pretty time consuming and prone to error.
Any ideas how to fix that? I suppose the migration described in 1-5 is quite thorough so I suspect some sort of code obfuscation so the simple search & replace function won’t do it.
Thanks!
- The topic ‘migrating WordPress from one subdomain to another (styles are always lost)’ is closed to new replies.