Hi!
Since my move from WP to Ghost, I have numerous blog posts that have urls in them I do not want linked back to the old blog, that’s still live, but set to private. I’d like to create redirects from my old external domain to my new internal post instead. Is that possible? I’m pretty sure it should work.
If the URL you want to redirect lives on an external domain then the request will go to that domain rather than your Ghost domain so it’s not possible to add a redirect on your Ghost site.
You’ll need to set up the redirect on your old Wordpress site/domain.
Ahh typical. But thanks for the info! I guess I have to manually update all the links then, because I just tried to re-import an updated json and it duplicated all the posts that I’ve already imported. Thanks again for the fast reply.
However, if you were using a third-party host, i.e., domain.wordress.com, this method won’t work since you need to point the domain to the server hosting Ghost.
Thank you for that reply!
Yes, I’ve been using WP in various ways, both self-hosted and with wp.com and when I last moved my WP it was to wp.com without my domain. I’m just gonna have to take the time and change the domains manually, unless anybody knows a trick on how I can re-upload posts without creating duplicates that is…
Is the WordPress.com site still active? If so, it may prove quicker to export the content to a local WordPress site, change the domain references, and then re-export for Ghost.
It did not work, and when I tried again, I got an error and no way to fix it, something about null reading replace? I guess it doesn’t like that I tried to run the same code again or something.
UPDATE! It did work!
The issue was the ^ symbol at the beginning of the regex. When I removed it (and some of the extra back slashes, it worked! I have no idea why it suddenly stopped updating posts. Turns out it refused to update “old posts”, but new posts created with the add-random-posts.js file were fine, and with those I continued testing and found out this.
This was the working pattern:
/domain.wordpress.com\/\d{4}\/\d{2}\/\d{2}/gmi
Now I just hope it will work with my production site, without removing all the posts and importing them again.