I’d like some technical support on the issue of migrating my wordpress local site live. I’m running into some difficulties updating image links which point to localhost directories – which are invalid while the site is live. So far I have not remedied this, and have tried manually changing links in the sql database to search n replace plugins.
If I update all instances of my ‘localhost/mywebsitename’ in my database (again tried manual, with queries, and with plugins) – My wordpress site has css styling break (styling that points to a custom file under a child theme which I used to modify the site).
Another thing I’ve tried is inspecting the broken images, searched them in my database; then replaced the ‘localhost’ link with ‘mywebsitename’ link – but this does not work and displays text instead.
I’ve also tried ‘re-attaching’ the unattached images one by one, and see no difference.
The site runs perfectly fine on my machine, as I developed it locally and if the links point to local directories the files are still there.
Could someone perhaps shed some light on the situation?
There are a number of things to check as well as doing the usual search and replace functions.
First, check you’re
htaccess
is correct. You’re localhost copy may have some redirect problems or url problems in the file so just double check it and possibly replace it. The basic WPhtaccess
can be found on the website. WP HTAccessNext you’ll want to check your WP Settings within the admin panel.
First, go into settings -> general and double check that WordPress address and Site address are correct.
Secondly, go into settings -> permalinks and check that the link structure is okay.
If this still doesn’t work, try doing a whole new clean install of wordpress and then using the backup and import method within the wordpress tools.
More information on everything can be found HERE