If you have decided to download WordPress and edit it on a local server, you will sooner or later also have to launch it. Here is how to do it step by step:
Most of the popular hosting services support WP. I for example use Siteground.
All of your content is linked to your localhost URL. Mine was for example called localhost/sisterworks. For the files to work, they have to be linked to your new, live website URL.
Go to Settings in your localhost WP dashboard –> General.
Then change both URLs to the URL address of your live website.
Open the localhost server that you are using (I’m using WampServer). When it’s running you can find a small icon in the bottom right of your screen. Left click on it and find the button called phpMyAdmin. Click it.
Log in with the log in credentials that you use on your local server (mine is WampServer). If you don’t remember creating a password and username, you have probably set it to the default which is username: root with no password. When you log in, you should first pick the database you want to export from and then do the export. Like this:
This will save all of your data (your blog posts, settings and so on) in a file that can later be exported to your live site. We will come back to that later in this article.
To use WordPress on your live site you first need to download it through your hosting. If you have read anywhere else that you have to create a database on your MySQL, this is exactly the same step. You simply create the database by downloading WordPress instead of setting it up manually. Go to cpanel (or whatever else your hosting uses) and find WordPress under Autoinstallers. Then click install.
Now when you go to cpanel –> MySQL Databases on your hosting site, you will be able to find a new WordPress database there. Go there and change your password as you will need it in the next step.
Because you have used another server before, the user credentials on your new server will be wrong. That means you will see an error message saying something like Error Establishing a Database Connection when trying to visit your website. To fix this, go to the software you use to edit CSS and php on your local server (I use Sublime Text). Under wp-includes, you will find a file called wp-config.php. Open it and change your user credentials.
You have already exported all of your data. Next step is to upload your php, CSS and HTML files to your live site. You do that with an FTP client such as FileZilla. Since you have already downloaded WP to your computer, you have probably already used an FTP client before. If you for some reason can’t find it, no worries. Download it and I will guide you through how to use it.
The left side shows the files on your local server. The right side shows the files uploaded to your online site. To connect with your online site, you first have to enter some details in the three fields at the top:
Host: Here you are supposed the DNS. You will usually find it somewhere under “My Accounts”, “Account Information” or “Manage Accounts” in your hosting account.
Username: Enter the username that you log in with on your hosting site.
Password: Enter the password that you log in with on your hosting site.
Double click on the right called Publich HTML (in some cases it’s called something else). Now right click on the folders in FileZilla you would like to upload to your live site. Generally, you always have to pick the folder on the right side that corresponds with the folder on the left side that you want to do something with. If you for example want to edit your CSS or php files later, you will have to first open the right folder on the right side before uploading from the left side.
The upload will take some time, so be patient.
Remember that export you did in step 3? Now it’s time to import it to your live site. Note that you are not supposed to enter it the same way you did in step two. You have to find it through your hosting’s website or it won’t work. It will usually be under cpanel or something similar. Find a button called phpMyAdmin. When you press it, you are taken to a page like this:
First, you have to pick the database you want to import to. This will be the folder created by your WordPress download in step four. Second, you have to browse your computer to find the exported file you saved in step two. Press go! Now your WP data has been imported from your local server to your live server.
Go to your website/wp-admin to log in for the first time. If you like me don’t remember ever creating a username and a password for your live WP site, no worries. You will be able to change it from your hosting account. This is how you do it on Siteground:
Go to My Account –> cpanel –> WordPress Toolkit (under the heading, WordPress Tools).
Click on WordPress Toolkit. Go to the bottom of the page where you can choose to manage your website. From there you can choose to reset your password.