I am moving old blog to new domain.
on the new domain i have created sub domain <strong>www.xyz.mysite.com</strong> i have installed new wordpress.
1-from old blog i have copied all my wp-content folder/sql database.
2-created new database/user
2-changed wp-config.php to reflect new database names.
4-opened sql databse file and replaced all instances of www.oldsite.com to <strong>www.xyz.mysite.com</strong>
1-when i went to import the sql database getting an error #1046 no database selected.
Q1. Are the versions of sql the same? You’ll need to check that the database you export and then the version you are importing to are compatible. I’ve run this manually a few times and just be sure to check that you are spitting out the right format and importing it. I did mine using phpmyadmin and it did throw up an error message once and it turned out to be me rather than the DB.
Q2. The DB and WP install are separate. But the WP install will look for the DB so I’d import that first.
Q3. Keep the versions of WP the same until after you’ve installed and got everything working correctly, or alternatively upgrade your old domain version prior to migration. Updates to WP do sometimes adjust the database settings/order so you could buy yourself some trouble by trying to jump versions.
Q4. esthetac looks like the user name of the account your website is/was hosted under.
Q5. See answer to 3 above. Keep them the same when migrating, update either after a successful migration or prior to migration. It means you know any trouble encountered is not to do with WP versions.
There are other ways to do migrations. Sometimes domain companies will be happy to transfer the entire account across if it is compatible with their system. I request these routinely for hosts that use cPanel, not all hosts are compatible but it would simplify your migration as they generate an entire account backup (db+wp+email etc) and restore it to their server.
The other option although not quite so necessary, is using a dedicated backup/migration tool. I routinely use Backup Buddy for both.
thank you for your reply.
I just wanted to do the hard way i have wp twin which does a super job and i could have given to hostgator to move from another hostgator to mine.
but i wanted to learn inside out how it works,i always backup sql database because i have heard that’s very important now i learned how to use phpadmin,…
i was not choosing the db first and importing.
i was doing text find/replace instead of running sql queries like update wp-post,…