Moving a website from localhost to the hosting

To transfer your files from localhost to the hosting, first you need to register a hosting account.




Go to http://localhost/wp-admin, enter the username and password and change the settings in "WordPress address (URL)" and "(URL)" - enter your domain name, for example: https://happyuser.aba.ae


  1. Add files to archive

    To do this on a local server, enter the folder with files and pack all of them into one archive.

  2. Export the database in phpMyAdmin.

    Log in to phpMyAdmin (http://localhost/phpmyadmin).

    In the list on the left select the database, than click "Export" and "Run".



    Now you have an archive with files and the file with all data from your database.

  3. Upload an archive with files to the main domain directory on FTP. We recommend using external program like FileZilla or TotalCommander to upload large archives to the server.

    To upload files, log in to your FTP account. The username and password can be found in the FTP Accounts section in the control panel.

    After uploading your archive will be unpacked automatically on the server.




  4. Import the database.

    First, create a database in Databases section in the control panel: select an account, click "Add", enter your username and password. The name of the database will be generated automatically.



    Log in to phpMyAdmin, select the database from the list on the left and click "Import" at the top. Select the file and click "Run".


  5. In the wp-config.php file, change the data concerning database (you can find them in the Databases section in the control panel). To do this, lod in to the FTP and edit the proper file.


    If you are using WordPress, you need to edit wp-config.php file.

    For example, if your data looks like this:

    			/** The name of the database for WordPress */
    			define('DB_NAME', 'wordpress');
    
    			/** MySQL database username */
    			define('DB_USER', 'root');
    
    			/** MySQL database password */
    			define('DB_PASSWORD', '123');
    
    			/** MySQL hostname */
    			define('DB_HOST', 'localhost');
    
    			should be amended as follows: 
    
    			/** The name of the database for WordPress */
    			define('DB_NAME', 'happyuser_aba_ae');
    
    			/** MySQL database username */
    			define('DB_USER', 'happyuser');
    
    			/** MySQL database password */
    			define('DB_PASSWORD', 'happyuser_pass');
    
    			/** MySQL hostname */
    			define('DB_HOST', 'mysql.aba.ae');
    		

    Instead of happyuser_aba_ae, enter the name of your database (DB_NAME constant) instead of happyuser - the name of the database user (DB_USER constant) instead of 123 - the password of your database (DB_PASSWORD constant) in Place of localhost - mysql.aba.ae (DB_HOST constant). All data you may find in the Databases section in the control panel.


  6. In the end it is worth to make sure all links are working properly.