I’ve run the google-pagespeed-insight tool, on which one link has been marked as not being https.
Further investigations lead to a lot of links in wp_posts having http://localhost/(…) as links.
It may be due to me moving of the site from a localhost installation to the live webspace.
So I’m wondering, if i could delete those links, as they won’t really point anywhere.
Is there anything else i’d have to check, like other tables?
Thanks folks!
Investigated links via wp_posts and found lots of localhost ones.
2
Answers
Posts and pages with links to other posts and pages need to be updated when migrating WordPress sites from one origin domain (like http://localhost) to another (like https://example.com). Hyperlinks inside posts and pages need changing. Therefore, migration is a screaming pain in the xxx neck to do correctly unless you use a migration plugin to do the hard work for you. Then it’s simple.
I use Duplicator, but there are several other good choices in the plugin repo.
If you have the choice of repeating your migration using a plugin, that is a good way to handle this.
If the URL’s are not being triggered on the pages then you are free to delete them, however this could result in unwanted errors. Therefor I suggest you replace all old
localhost
URL’s inside of your database with your new URL.You can achieve this using the following SQL query.
Or you can use a WordPress plugin, when I worked with WordPress we mostly used wp-all-import. Make sure that after you imported a website using any migration plugin you save the permalinks in the settings tab in wp-admin.