I’m having trouble migrating a WordPress site I’ve been working on from my local machine onto a host.
I’ve been through the documentation and as far as I understand, I have to:
- Export the wordpress database from my local server.
- Edit the wp-config.php file to suit my target server.
- Change the URL’s in the settings to suit my target server.
- Import the database on my target server and move over the adjusted wordpress installation onto my target server.
I can do all of this, but my there seem to be some problems: in my hosts phpmyadmin I can’t view or edit any users and neither can I create any databases (there’s no option for it). When I try to import a database I get an error: #1046 – No database selected.
What do I not know/doing wrong?
If importing a database, you need to create one first with the same name, then select it and then IMPORT the existing database to it.
If you’re going through CPanel, you won’t be able to add a database directly through PHPMyadmin. You should go to your host’s home page and look for some wizard to create a database. (it should be next to the PHPMyadmin link.
Alternatively, for moving wordpress, You can install wordpress on your live site, then export your localhost content via WordPress’s dashboard and then import it on the live site.
This article on Moving WordPress will also be helpful.