Moving blog to new hosting without losing Jetpack stats
-
Hello all,
I’m trying to find the step-by-step guide to move the blog to a new hosting server while keeping the Jetpack stats intact. I’ve seen a few threads about issues with the migration due to URL, site ID for jetpack, etc. so I want to double check I have the right instructions.
Is there anything missing here? These are specifically without using a plug-in
- Download the whole WordPress folder from current hosting via FTP
- Export SQL database from current folder via MySQL
- Create SQL database in new hosting via MySQL (new database name, username and password)
- Update wp-config.php with the new database details (name, username, password)
- Upload the whole WordPress folder to the new hosting via FTP
- Validate that everything has worked correctly before changing domain names – instead of blogdomain.com (which is still pointing to the old hosting) everything should load normally going to domaininnewhosting.com/blogdomain
- Edit nameservers in the domain manager
- Jetpack stats will carry over automatically because:
- The blog domain is not changing
- The WordPress.com associated with Jetpack is not changing
- Uploading the SQL database to the new hosting before uploading the files means that once WO runs in the new server, it will see the site ID and account details correctly
- But what I feel I’m missing: how does Jetpack know that blogdmain.com and domaininnewhosting.com/blogdomain are the same? Or how do I prevent Jetpack from looking at things until I have pointed the domain to the new server?
The blog I need help with is: (visible only to logged in users)
-
Hi there!
Thanks for reaching out! That looks like quite an elaborate set of steps that should work the way you expect them to. Meaning, the Jetpack stats should transfer over. However, if they don’t, we can help!
Broadly speaking, Jetpack uses the domain and post IDs to track stats. Even if you change your site domain, as long as the post IDs remain the same, we can move the stats for you.
In this case, it sounds like your domain and post IDs will remain the same, so the stats should remain unaffected as well. But if they do change (or disappear, for any reason), please feel free to contact Jetpack support.
Hope that helps!
-
Thanks @aisajib! That makes me feel better.
Does that mean that, at some point, there are two links that would count towards the same post stats? For example, the post “new post” would be accessible for a short period of time through both blogdmain.com/new-post and domaininnewhosting.com/blogdomain/new-post, right?
-
Hi @dresde,
If I understand it right, you’ll migrate the posts to a temporary domain first and then move the main domain over. Does that sound right? From Jetpack’s perspective, if blogdomain.com/new-post is the current URL, domaininnewhosting.com/blogdomain/new-post will not have any stats because the domain doesn’t match. However, when the domain is updated in your new hosting to match blogdomain.com/new-post, the stats should appear again.
However, we can merge stats from blogdomain.com/new-post to domaininnewhosting.com/blogdomain/new-post if you want, but if you’ll be using the current domain later, it doesn’t make sense to do that, if you get what I mean. :)
-
You’re welcome! Feel free to let us know if you don’t see the stats after your domain is pointed to your new host.
- The topic ‘Moving blog to new hosting without losing Jetpack stats’ is closed to new replies.