wordpress

How to Upload Your WordPress Site to a Live Server

You will agree that the use of WAMP Server to build website offline is an amazing way of saving your data bundle. After designing the website, the next question would be how do I make my website live? That was the basis for this article. If you have wanted to upload your WordPress site to an online server where it could be visible to everyone who visits, follow the procedures listed here.

Before we start, go to your “www” folder in your local computer and have your WordPress files zipped. This will hasten the uploading process. In case you don’t know how to zip the files, open your computer C Drive and locate Wamp -> www -> (your site folder). Of course, “your site folder” represents the name given to your website folder. Select all the files inside the folder by pressing Ctrl + A key on your keyboard. Now right click on any of the selected files and scroll to “Send to”, choose Compressed (Zipped) folder option.

Note: This option will only work on any window 7 computer. If this option doesn’t work for you, download any zipping software.

  1. Exporting your local database

On your local server, go to the phpmyadmin page. Click on the database the site is associated with on the left side of the page. Click export button on the top menu and click GO. Save the file because we are going to use it later.

  1. Upload Your Website

This step will requires us to download FTP software. What the software does is to help us convey our files to your hosting account. Google search “Filezilla”, download and install the software. Open the Software, fill in your account information like the “Host” Which should carry your site address, username and password of your account then click Connect. When it’s successful, you will notice there are two active windows with folders similar to the image below:

how to upload wordpress to live server by nollytech

Open the folder public_html from the remote server section. Equally locate the zipped file from the local computer section and upload by right clicking on the compressed file and choosing upload.

  1. Creating a database

    While waiting, use this period to start creating a database on your live site. Login to your Cpanel by visiting (www.mynewsite.com/cpanel). Replace “mynewsite” with your new website address. If you are already on the dashboard, go to databases section and click on MySQL database.how to upload wordpress to live server 2

Enter a name for your database and click on create database. In the user section, enter a name for the user or select an existing user if you have and click on create user. Note those details down since we are going to need them in the next steps.

  1. Importing the database

    Quickly go back to the dashboard and click phpmyadmin on the databases section. Click the database you just created on the left side of the page and click Import on the top menu. Click on Browse then upload the database that you exported earlier. Finally click on the “Go” button which can be found at the bottom of the page.

  2. Modifying URLs

Let’s change the URLs from the default local host to your live website. Click the Browse link in front of WP_OPTIONS.how to upload wordpress to live server

You are going to change two things, The site address and home address. click the edit button in front of the siteurl and change the address to your new website address starting with http://.  After making the changes, click Go to save changes and remember to also change the home address too.

6. Extracting Your WordPress Files

Back in your Cpanel dashboard, click the file manager and then enter your website root folder. Unzip the uploaded file, to do this, click the zipped file and then click extract in the top menu. When you have successfully extracted the files, go on to the last step of this tutorial

7. Connecting your database

Remember I asked you to keep your database information handy since we are going to be using them in this step. Among the just extracted files find “wp-config.php” in your file manager.

Select the file and click on edit in the top menu.

Here you are required to change four things for your website to go live which are The Database Name, The Name of the user, The Password and the Hostname which most of the times, it remains local host.

  1. Change the figure in front of (DB_NAME) to your new database name
  2. Enter the name of the user on the second line which I labeled: figure_b
  3. Enter the password in the third line and leave the hostname on default.

// ** MySQL settings – You can get this info from your web host ** //

/** The name of the database for WordPress */

define(‘DB_NAME’, ‘figure_A‘);

/** MySQL database username */

define(‘DB_USER’, ‘figure_B‘);

/** MySQL database password */

define(‘DB_PASSWORD’, ‘C‘);

/** MySQL hostname */

define(‘DB_HOST’, ‘localhost’);


When all the changes are made, click the Save button. Congratulations! Your website is now live.

Note: If your WordPress site cannot connect to the database, you may read this article on How to Fix the Error Establishing a Database Connection in WordPress

If you are still having problem uploading your locally designed site to a live server, drop your question(s).

 

About the author

Victor Ikani

Ahmadderar is a website developer and SEO specialist. In his spare time, you'll catch him either reading books or attempting to write tutorials.

Leave a Comment