Migrate eBlogger to WordPress : How to add a Java Script Redirect

I migrated my blog from eBlogger to WordPress (a new domain name with new hosting) on Aug, 2021 using the All-in-One WP Migration plugin. It’s a pretty easy process by following the guide and video shown in the plugin page. But, I have to do 2 things manually after migration:

  • Replace all the images on my blog by uploading to the site gallery because it’s still using the old path which is hosted in eBlogger, which is quite a tiresome task ;D
  • Add a java script code to my eBlogger, so the clients visiting the old site (whatever the URL they called) are redirected to new domain.

For adding the java script in the eBlogger, go to Themes >> My Theme >> Edit HTML and add the following code after <head> section (Just replace my domain name with yours). See Fig-1 for reference.

<script>
window.location.href = window.location.href.replace(window.location.origin,&quot;https://www.scriptinghouse.com&quot;) 
</script>
Fig-1: Sample Settings

Leave a Reply

Your email address will not be published. Required fields are marked *