Viewing 1 replies (of 1 total)
  • Moving an localhost site to an EMPTY online database I would do as follows:

    Create a backup of the localhost WP-site:

    1. Make a backup of the files of your localhost site, using the explorer or such.
    2. !!VERY IMPORTANT!!
      Make a backup of the CONTENT of the localhost site
    3. dashboard > tools > export > all content > download exportfile
    4. If required: confirm installation of export tool and run the export

    You will need this to transfer your content, later on.
    You now also have a fallback position, should things go wrong!

    NOTE!!! Make these backups every time BEFORE you make changes!
    Repairing problems becomes much easier!!
    == == ==

    1. Online: all you need to do is install / copy wordpress to the webhost server using FTP such as filezilla.
    2. create a database on the server / ask the webhost to provide one
    3. In a browser: ‘https://www.mydomain.com’, to start the WP-install.
    4. After the WP-install, check if all is well.
    5. !!IMPORTANT!!Now make a backup of the wp-config.php-file of the NEW online install
    6. == == ==

    7. Copy all files and folders [backup above]of your localhost site to your online site, OVERWRITING the new.
    8. Copy the backed-up NEW online wp-config.php back onto to the online site, overwriting the existing one
    9. Now restore the content of the localhost, onto the online site, by restoring the database backup, made at the top of this list
    10. Go to the online site:
      Dashboard > Tools > Import > wordpress > choose the exportfile from your computer, and ‘upload file and import
    11. If required: confirm installation of import tool and run the import

    You should now have a online version of your old localhost site.

    == == ==
    The other obvious way is to use
    phpmyadmin [in wamp / mampp and lamp-servers] to create an exportfile:

    1. open your localhost database using phpmyadmin
    2. select the correct database
    3. click the EXPORT-tab
    4. select quick option; and ‘sql’ as the filetype to be stored to.
    5. start the export, save the file on your pc
    6. Online: access the database of the site using phpmyadmin [supported by most webhosts]
    7. click the IMPORT-tab
    8. import the sql-file, just created;
      Follow instructions on screen
    9. DONE!

    10. Problem? – check `wp-config.php [online site] to see if you’re connected to the correct databse]
Viewing 1 replies (of 1 total)
  • The topic ‘How to migrate local WP install mysql database to server?’ is closed to new replies.