Many WordPress users prefer to work on their websites using a local server on their computer. This allows you to work on your website privately before making changes available online.
Eventually, you’ll need to move it to a live server to make it accessible to online visitors. This transition is crucial to ensure that your website functions properly on the live site.
We’ve worked on many local websites, so we had to learn the easiest way to transfer content to live websites.
In this article, we will provide step-by-step instructions on how to move WordPress from a local server to a live site.
Why Move WordPress From a Local Server to a Live Site?
Building your WordPress blog on a local server is a safe way to test changes on your website without affecting visitors.
When you have finished perfecting your website, the next step is to move from your local server to a live site.
Let’s show you two ways to move your site from a local server to a live site.
The first method uses a WordPress migration plugin and is recommended for beginners.
In the second method, we will show you how to manually move WordPress from a local server to a live site.
You can choose the method that works best for you:
Before You Migrate Your WordPress Site
You need to have a few things in place to migrate WordPress from a local server to a live server.
First, we assume that you have a WordPress site running on a local server (also called localhost) on your computer and that you have full access to it.
Next, you’ll need to have a domain name and web hosting.
We have heard countless stories from beginners who started with poor or free web hosting providers and regretted it. In our experience, choosing the right hosting provider is critical to the success of any website.
To make your decision easier, we recommend using Bluehost. They are an officially recommended WordPress hosting company, and they are giving WPBeginner users an exclusive discount + free domain and SSL.
Basically, you can get started for as little as $1.99 per month.
If you want a great Bluehost alternative, you can look at Hostinger. They are also offering an exclusive discount to WPBeginner users with a free domain name.
If you can afford to pay a little more, then check out SiteGround. They also have a special deal for WPBeginner readers.
If you need help setting up your website, then follow our step-by-step guide on how to make a website.
Finally, you will need an FTP program and know how to use FTP to upload your local server site to the live site.
Ready? Let’s begin migrating your WordPress site.
Video Tutorial
If you’d prefer written instructions, then just keep reading.
Method 1: Transfer WordPress From The Local Server to Live Site Using a Migration Plugin (Recommended)
This method is easier and recommended for beginners. We will be using a WordPress migration plugin to move WordPress from localhost to a live site.
Step 1: Install and Set Up the Duplicator Plugin
First, you need to install and activate the Duplicator plugin on your local site. For more details, see our step-by-step guide on how to install a WordPress plugin.
Pro Tip: There is also a pro version of Duplicator that offers secure backups, cloud storage, easy site restore, and more.
Upon activation, you need to go to the Duplicator » Backups page and click on the ‘Create New’ button.
This brings you to a screen where you can give your backup a name.
Then, click the ‘Next’ button.
Duplicator will now run some tests to see if everything is in order.
If all items are marked ‘Good,’ then click on the ‘Build’ button.
This process may take a few minutes, depending on the size of your website. You must leave this tab open until it is complete.
Once finished, you’ll see download options for ‘Installer’ and ‘Archive’ packages. You need to click on the ‘Download Both Files’ button to download both files to your computer.
The ‘Archive’ file is a complete copy of your WordPress site. It includes all WordPress core files as well as your images, uploads, themes, plugins, and a backup of your WordPress database.
The ‘Installer’ file is a script that will automate the entire migration process by unpacking the archive file containing your website.
Step 2: Create a Database for Your Live WordPress Website
Before you can run the installer or upload the WordPress website from localhost to your hosting server, you need to create a MySQL database for your new live website.
If you have already created a MySQL database, then you can skip this step.
To create a database, you need to visit your hosting account’s cPanel dashboard. Then, locate the ‘Databases’ section and click on the ‘MySQL Database Wizard’ icon.
On the next screen, there’s a field to create a new database.
Simply provide a name for your database and click on the ‘Create Database’ button.
cPanel will now create a new database for you.
After that, you need to enter a username and password for your new user and then click the ‘Create User’ button.
Next, you need to add the user you just created to the database.
First, click the ‘All Privileges’ checkbox.
Then, scroll down and click the ‘Make Changes’ button to save your changes.
Your database is now ready to be used with your WordPress site. Make sure to note down the database name, username, and password. You’ll need this information in the next step.
Step 3: Upload Files from the Local Server to the Live WordPress Website
Now, you need to upload the archive and installer files from your local site to your hosting account.
First, connect to your live site using an FTP client. Once connected, make sure that the root directory of your website is completely empty.
Normally, the root directory is the /home/public_html/
folder.
Some WordPress hosting companies automatically install WordPress when you sign up. If you have WordPress files there, then you need to delete them.
After that, you can upload the archive.zip and installer.php files from Duplicator to your empty root directory.
Step 4: Running the Migration Script
After you have uploaded the migration files, you need to visit the following URL in your browser:
http://example.com/installer.php
Don’t forget to replace ‘example.com’ with your own domain name.
This will launch the Duplicator migration wizard.
The installer will run a few tests and will initialize the script.
Under the Setup section, you will be asked to enter your MySQL host, database name, username, and password.
Your host will likely be a local host. After that, you will enter the details of the database you created in the earlier step.
Then, click on the ‘Validate’ button to make sure the details you entered are correct.
After that, click on the ‘Next’ button to continue.
Duplicator will now import your WordPress database backup from the archive into your new database.
It will also update URLs pointing to the local site and your new live site.
You can now click on the ‘Admin Login’ button to enter the WordPress admin area of your live site.
Once you log in to your live site, Duplicator will automatically clean up the installation files.
That’s all. You have successfully moved WordPress from the local server to your live site.
Method 2: Manually Transfer WordPress From the Local Server to the Live Site
In this method, we will show you how to manually move WordPress from the local server to your live site. It will be useful if the first method doesn’t work or if you prefer to do it manually.
Step 1: Export Local WordPress Database
The first thing you need to do is export your local WordPress database. We will be using phpMyAdmin to do that.
If you are unfamiliar with it, then you might want to take a look at our guide to WordPress database management using phpMyAdmin.
Simply go to http://localhost/phpmyadmin/
and click on your WordPress database. Next, click on the ‘Export’ button from the top menu bar.
In the ‘Export method:’ option, you can choose ‘Quick’ or ‘Custom.’ Custom will provide you with more options to export your database.
But we recommend choosing ‘Quick’ and then clicking the ‘Go’ button to download your database.
Step 2: Upload WordPress Files to Live Site
Now, we will need to move all your website files to the live site.
To get started, go ahead and open your FTP client and connect to your web hosting account.
Once you are connected to your live site, make sure you upload the files in the right directory. For example, if you want the site to be hosted on ‘yoursite.com,’ then you will want to upload all the files in your public_html
directory.
Now select your local WordPress files and upload them to your live server.
Step 3: Create a MySQL Database on Your Live Site
While your FTP client is uploading your WordPress files, you can start importing your database to the live server.
Most WordPress hosting providers offer cPanel to manage your hosting account, so we will show you how to create a database using cPanel.
First, you need to log in to your cPanel dashboard and click on the ‘MySQL Database Wizard’ icon, which can be found in the ‘Databases’ section.
On the next screen, you can create a new database.
You need to provide a name for your database, then click ‘Create Database.’
cPanel will now automatically create a new database for you.
Next, you need to enter a username and password for your new user and then click ‘Create User’.
After that, you need to add the user you just created to the database.
First, check the ‘All Privileges’ checkbox.
Then, scroll down and click ‘Make Changes’ to save your changes.
You’ve successfully created a new database for your live WordPress site.
Step 4: Import WordPress Database to Live Site
The next step in the process is to import your WordPress database.
Go to your cPanel dashboard, scroll down to the ‘Databases’ section, and click on ‘phpMyAdmin.’
This will take you to phpMyAdmin, where you want to click on the database you just created above. phpMyAdmin will show your new database with no tables.
Next, click on the ‘Import’ tab in the top menu. On the import page, click on the ‘Choose File’ button and then select the database file from the local site you saved in the first step.
After that, click the ‘Go’ button at the bottom of the page. Your database will automatically be imported to phpMyadmin.
Step 5: Change the Site URL
Now, you need to change the site URL in your database so that it will connect with your live WordPress site.
In phpMyAdmin, look for the wp_options
table in your database that you just imported above.
If you changed your database prefix, then instead of wp_options
, it might be {new_prefix}_options
.
Next, click on the ‘Browse’ button next to wp_options
. Or, click the link in the sidebar to open up the page that has a list of fields within the wp_options
table.
Then, in the options_name
column, you need to look for the siteurl
option.
Then, click the ‘Edit’ icon.
This brings up a window where you can edit the field.
In the input box option_value
, you’ll see the URL of your local install, which will be something like http://localhost/test
.
You need to insert your new site URL in this field, for example: https://www.wpbeginner.com
.
Then, you can save the field by clicking the ‘Go’ button.
Next, you need to follow the same steps as above for the home
option name. The wp_options
menu can be a few pages long. Usually, the home
option will be on the second page.
Then, update the home
URL, so it’s the same as your live site URL.
Step 6: Set Up Your Live Site
Now that you’ve imported the database and uploaded your content, it’s time to configure WordPress.
At this time, your site should be showing an ‘Error establishing a database connection‘ error.
To fix this, connect to your website using an FTP client and open up the wp-config.php
file.
You’ll be looking for the following lines of code:
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'database_name_here' );
/** MySQL database username */
define( 'DB_USER', 'username_here' );
/** MySQL database password */
define( 'DB_PASSWORD', 'password_here' );
/** MySQL hostname */
define( 'DB_HOST', 'localhost' );
You will need to provide the database name, username, and password you created earlier.
Next, save the wp-config.php
file and upload it back to your WordPress hosting server.
Now, when you visit your website, it should be live.
After that, you need to log in to your WordPress admin panel and go to the Settings » General. Then, without changing anything, scroll to the bottom and click the ‘Save Changes’ button.
This will make sure that your site URL is corrected anywhere else that it needs to be.
Once you’ve done that, go to Settings » Permalinks, then scroll down and click ‘Save Changes’ to ensure that all post links are working fine.
Step 7: Fix Images and Broken Links by Updating Paths
Whenever you are moving a WordPress site from one domain to another or from a local server to a live site, you’ll face broken links and missing images.
We’ll show you two ways to update URLs. You can pick one that works best for you.
1. Update URLs Using Search & Replace Everything Plugin (Recommended)
The safest way to fix this is by using Search & Replace Everything. It is a powerful WordPress plugin that allows you to easily perform bulk update tasks on your website without writing complex database queries.
First, you need to install and activate the Search & Replace Everything plugin.
After activation, go to Tools » WP Search & Replace page.
From here, you need to enter your local site URL in the ‘Search for’ field and your live site URL in the ‘Replace with’ field.
Scroll a little and click ‘Select All’ under the tables. This ensures that the plugin will look for the old URL everywhere in the database.
Now click the ‘Preview Search & Replace’ button to continue.
The plugin will search your database for all instances of the old URL and then preview the results.
If everything looks good, click ‘Replace All’ to save the changes.
You’ll see a warning about the changes you are making. Click ‘Yes’ to continue.
The plugin will now update the database and replace local URLs with your current website URL.
2. Update URLs Manually (Advanced)
Another way to update the URLs is by using the following SQL query:
UPDATE wp_posts SET post_content = REPLACE(post_content, 'localhost/test/', 'www.yourlivesite.com/');
Simply go to phpMyAdmin, click on your database, and then click on ‘SQL’ from the top menu and add the query above.
Make sure you change it to your local site and live site URLs and click the ‘Go’ button.
That’s it. You have now successfully migrated WordPress from your local server to a live site.
Hopefully, your live website is up and running smoothly. If you notice any errors, you can check out our guide to common WordPress errors for help with troubleshooting.
We hope this article helped you move WordPress from a local server to a live site. You may also want to see our guide on moving a live site to a local server or look at the ultimate website migration checklist for practical WordPress migration steps.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Lisa
On step 4, when I try to import the gzipped database I get this:
Error
SQL query:
—
— Database: `testbtat`
—
CREATE DATABASE IF NOT EXISTS `testbtat` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
MySQL said: Documentation
#1044 – Access denied for user ‘btatxcom’@’localhost’ to database ‘testbtat’
Bunty Gurung
@Lisa the import could be a .zip or plain text .sql file, does not matter. You are getting the error because name of the database you are trying to upload does not match with the name that you have created.
In this case I assume that your username on the live site is ‘btatxcom’. So generally your database would be btatxcom_yourdb. If that is the case, go to localhost. Simply export your database as a .sql file – without using custom options. Save it on desktop. Rightclick open-with notepad++ (if you do not have it on pc, just download, it is very easy in usage eg. like notepad, just a bit more fancy).
You will find this line CREATE DATABASE IF NOT EXISTS around line number 22 or else search for the term. Now there, the name of your database occurs twice, change it to match the name of database on your live site eg. someprefix_yourdb. Save it, go to your phpmyadmin -> your database -> browse and import the saved .sql file. That should do it. Hope this helps someone.
Wanda Serros
Thank you for the tutorial. I followed all the steps correctly I believe. It worked like a charm until I went to look at my site. I get the following:
Your server is running PHP version 4.4.9 but WordPress 3.8.1 requires at least 5.2.4.
although when I go to my Cpanel it says: PHP version 5.3.26
Also when I try to go to admin I get:
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/drser3/public_html/wp-admin/index.php on line 103
I appreciate any help you can give me. Thanks
Wanda
WPBeginner Support
Please contact your web hosting service provider. They will be able to assist you better in this matter.
Admin
Wanda Serros
My website is now up and running although I have some issues to correct. Just thought I’d report back for other user who might be using Lunarpages for webhosting. I had to go to control panel and choose PHP5, then a phpini file had to be added under my public_html directory with
memory=64MB
and lastly I had to add:
suPHP_ConfigPath /home/username/public_html
into my htaccess file.
Wisdom
thank you. was so helpful
David
Hi,
I can access the wp-admin after moving the database over but for some reason I get a whitescreen when I type my url in. It doesn’t seem to be finding the html / css for any of the pages. Its odd because It loads perfectly on the wamp localhost.
Any ideas?
thanks
WPBeginner Support
Go to Settings -> General and make sure your WordPress Site and Home urls point to your new location.
Admin
Roanna
You do not know how much this article has helped me!
Thank you so much for taking the time to write and post this!
Sam
Thanks for your tutorial, its very helpful.
Janeth
Great tutorial, thank you very much.
I guess it is the same process from a dev server to production server right?
WPBeginner Support
Yes it is.
Admin
AM
Thank you so much for posting these instructions!! I could NOT have transferred my client’s site to the live site without this!! Just one note: Under Step 3, your instructions are missing the note about “hostname”. This took me a sec to figure out but I was able to add that in. In case anyone else has any problems with that part of the database creation. Thanks again!!
abel kayode
Hi
Thanks for the educative article.
I followed every step but I end up getting this error
Parse error: syntax error, unexpected ‘DB_PASSWORD’ (T_STRING) in /home/swagphot/public_html/wp-config.php on line 26
I checked my wp-config for typo but everything seems correct I need help, I don’t know how to
Resolve this… Thanks
WPBeginner Support
You are probably missing opening bracket ( just before DB_Password
Admin
Miriam
I am brand new to this and this explanation is by far the clearest explanation I have found but I am still having problems. I have transferred my files to my host server but am stuck on the database. I have a local installation of WordPress established with Bitnami. When I go to http://localhost/phpmyadmin/, I don’t see my database; I only see information_schema and test. I checked my wp-config.php and see ‘DB_NAME’, ‘bitnami_wordpress’. I am clueless as what to do or where to look next. Any help would be greatly appreciated. Thanks.
WPBeginner Support
In your wp-config.php check your DB_User and DB_Password use these to log into phpMyAdmin and then you will be able to see your database bitnami_wordpress
Admin
Miriam
THANK YOU. THANK YOU. THANK YOU!!!!!
Sisira
Awsome Tutorial………………..Very useful for a beginner……….I just tried and made my site live……………………..This is my first website……………Thank you so much……………….
james Daly
Thank you so much for this article – It was easy to follow and worked out perfectly for me – thought it would be a daunting process but was pretty easy if you followed the steps correctly
Bilal Ahmad
i done all theme steps.. after this i cannot acces to my dashboad. when ever i go to my admin pannel and enter the username and pass which is correct. But it cannot redirect me to my dashboad. its redirect me to my admin panel again and again. pls help
Kirit Patel
This tutorial is very important for beginner, who doesn’t know how to move local wp site to live site. it is useful for me.
Thanks a lots.
mira
hi,
thanks for this useful article.
bt i have an error like
1044 access denied
pls would u help me out from this database error?
jay
To solve the 1044 Access denied error. You should open the database file in your text editor and delete the following code.
— Database: `XYZ`
—
CREATE DATABASE IF NOT EXISTS `XYZ` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `XYZ`;
Terry
Thanks for all your help with these tutorials! I am learning a lot. I have a problem that has been mentioned before but I am not getting a solution.
I’m stuck on step 6, I keep getting Error establishing a database connection.
I did change one thing in your procedure, in step 6 I edited wp-config.php to include define(‘DB_HOST’, ‘www.mysite.com/my_staging_site’);
Anyway, I still can’t connect, and if there is anything you can do to point me in the right direction I would appreciate it!
charles
I had this problem as well but make sure there are no small typos when entering in the database name, username, password, and host. My problem was the aposhtrophe symbol were different (‘ symbol). When I started changing the name the apostrophe changed to a different symbol and it is really hard to tell if it changed. But i fixed this and it worked
rahul
U just needed to change the dbname and site cpanel username and password to the feild it is asked in wp-config.php
Jody Hockley
Thanks for such an easy to follow and simple guide. Did it all in under 20mins. Has made my life so much easier. Much appreciated…
Vivek
Followed the same steps.
Website got live on server but facing the following problem.
Menus are not appearing in Admin Panel.
The settings are not saving if try to make any changes.
Any idea?
WawanAdie
Okay. it will be useful thanks
jeret
Hi, i have successfully upload all the files to the web server. I am able to view my wordpress site.
The problem is when i try to access the admin page. Using the username and password which i created using the cpanel, is not working. it says invalid username. I have modified the wp-config.php file. I have made sure the new username and password are updated.
What about this line in config file what do i change it to :
/** MySQL hostname */
define(‘DB_HOST’, ‘localhost’);
Thanks.
Mustafa
Check for:
/** MySQL hostname */
define(‘DB_HOST’, ‘mysql.yoursite.com’);
Miroslava Donchev
Thank you for the wonderful article! I am so grateful there’re people like you to share knowledge
I transferred my local site to live hosted site and I got only one error so I want to share how I solved it. I got a black page on the the permalink options page and I found the following solution from DebbieV:
“I edited wp-admin/includes/misc.php, forcing the value of $got_rewrite = true;”
May be that can help somebody else as well.
Cheers!
Mira
dhani
Hi,
Is there any way to export from wordpress.org to wordpress.com without having to host the site and pay?
I have my blog in wp.org but want it to go live without paying…just wondering if there are any options for this.
Thank you.
Jay
I followed all of the instructions except for exporting my database from localhost in gzipped because I tried importing on live server in phpMyadmin it gave me an error “#1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘?’ at line 1”. But it import the database when I use zipped compression but after waiting 7 hours to upload all my files from localhost to live server it asked me to install Wordpress and when I install Wordpress none of my posts are in there.
Jay
I have already changed the information for the database in wp-config and still it asks me to install Wordpress
WPBeginner Support
Did you change database table prefix? Are you sure that the database you are connected to is not empty?
Admin
Jigar
I had same problem but solve with database prefix, It must be same as in database on server,
Thanks ADMIN,
soon hao ng
Thanks for your tutorials provided. It’s very helpful. I managed to move my wordpress from local server to live site. However, when I login to my admin panel. The error message was shown:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Could any experts here please advise how to fix this problem?
Thanks
WPBeginner Support
See our guide on how to fix Internal Server Error in WordPress.
Admin
tatiana
Hello,.I intend to upload a localhost to a server … I’ve done all the above steps MANY TIMES .. but this message always appears” You don’t have permission to access / on this server..
WPBeginner Support
Please contact your webhost this seems like a server configuration issue.
Admin
Jose
Hi. Thanks this post is more useful than all the other stuff i found on youtube.
However, I can´t seem to get my site up and running, even after following all the steps carefully.
I can access my admin from my live website, and everything including plugins and themes, posts and pages seems to be up there on the dashboard. However the website, even accessing it from the dashboard itself shows a blank page. Any clue where the problem might be and what I might do to solve it?
Thanks!
WPBeginner Support
Seems like you have successfully moved your site from localserver to live. Now you just need to fix the white screen of death. Let us know how it goes.
Admin
Jose
Thank you!
It turned out I was using a child theme. Switching to the original theme and making changes from the theme’s settings instead of the new stylesheet solved the white screen of death. Thank you for the clear, thorough and useful blog.
Jose
David
Your issue was exactly the same as my issue now. Only, I am not using a child theme, its a custom theme. Just can’t get it to work even though it works on my localhost.
Can anyone advise me on this?
Thanks
Mai
Hi, I think I may have commented too soon. Everything works fine except for the recent comments section where it doesn’t display comments, but links to “localhost” blog entries.
This is my blog: http://www.sugaroverkill.com/blog/
I’ve done all the steps including #7. Is there another step I need to do for the recent comments to display correctly?
WPBeginner Support
It seems to be working now
Admin
Mai
Thanks for the article. It worked like a charm!
Jack Allen
Hi, Was just wondering if you had to change the DB Hostname in the wp-config file as ive still got error establishing database connection. Thanks Jack
WPBeginner Support
Yes you will have to change your database name in wp-config file.
Admin
Beth
Thank you for this resource! Everything appears to be working properly with the migrated site, but we are unable to access the new site’s wp-admin to log into Wordpress. We did not do a new install of wordpress, we simply transferred all files of the previous site to the new directory. Is a wordpress install necessary if a site is up an running on two different URLS?
WPBeginner Support
You would also need to move your database. No when moving WordPress from one location to another you don’t really need to run the install script again.
Admin
Verna
Just wanted to drop you a line to say THANK YOU !!!
Your instructions worked perfectly for a first time user and your efforts are really, really appreciated.
Bless You !
Albert Clayton
I’ve been migration my WordPress sites using All in One WP Migration plugin – http://wordpress.org/plugins/all-in-one-wp-migration/
annie
hello there,
I’m planning to use this tutorial to transfer localhost for the first time.. (I haven’t read it all yet)
but, I’ve noticed I need to use phpadmin and since I’ve first used WAMP I wasn’t able to use phpadmin and I’m not quite sure what’s wrong (I’m sorry if you mention this somewhere here please ignore my comment),…
Is there any way I can transfer my site without phpadmin? i.e. by copying and pasting something?
excuse me as I am completely new to this…
thank you
WPBeginner Support
You can export your database on local host by using wp dbbackup plugin.
Admin
annie
thank you for your reply
annie
hello again,
I have followed every step successfully but i can’t go to step 6 because the ftp upload to public_html has stuck at 99%
any idea what might be wrong?
thanks.
Hitesh
hey i did the same you mention here but still i cant change theme logo i import old site to new site
Jeff Matt
Thank you so much! This worked perfectly for me and I no longer worry about developing in MAMP any more. Cheers!
Ravi
Thanks a lot..
Rajeev
Many Thanks for this tutorial
Jose Luis
Thanks for all! You save my life!
ashish gupta
I really understand what you are actually saying, first time i also hung up on that situation and i did not know how to do that.
Westy
Hi, thank you for a great tutorial.
Everything seems to run smoothly for me except the appearance is completely messed up.
I am using bp default theme with a child theme on the local server. After the import the bp default (parent) does not show in the Appearance>Themes setting which breaks my child theme. However all the folders etc for bp-default have been uploaded from local to live site, so I can not work out why the issue is occurring.
Has anyone else had this problem and can help me fix it?
Thank you for your time.
clare
Weary, just wondering if you solved your problem. And if so how?
I’m currently having the opposite problem. My child theme worked great on the local server, but in migrating it to the live server, it’s now broken and it restored the parent theme . I’m hoping if you fixed your problem it would clue me in to what I am doing wrong.
Pomen Yala
Thanks for sharing this info. Life lot’s easier to switch wordpress for me now
Heidi Anderson
Hello, I really need some help. I get to step4 and I find my new db that I created in the SQL server, it has no tables, I click on it, I hit import and I get the following in red, “The directory you set for upload work cannot be reached”. This is before I even try to upload my file. What did I do wrong?
Venkat
Hai.. Your tutorial teach very clear. I am so happy about your help. Thanks !
Priyanka
hey thanks for sharing such awesome tutorial….:)
Samantha
Hi, I exported my database from localhost and im trying to do step 4. I got the error 1044 but seen on previous comments to delete a section and change to my live database name. I tried to import again and now I get the error
#1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘– phpMyAdmin SQL Dump
— version 4.0.4
— http://www.phpmyadmin.net
—
— Ho’ at line 1
Can you help at all??
WPBeginner Support
Undo the changes you made earlier.
Admin
Mark Johnson
Hey I had the same problem. You have to edit the import file before you upload it. Here is a link showing you hhow to do it: http://support.hostgator.com/articles/cpanel/how-to-import-your-mysql-database
Then you zip it with the name “yourdatabasename.sql.zip” and then upload
Quentin
Excellent guide – very clear. And, I learned a few useful things in the process. Thank you.
Gwen
When I try to import my sql file into the new database, I get this error from phpMyAdmin:
#1103 – Incorrect table name
Any ideas on what I might be doing wrong?
WPBeginner Support
When creating your export file make sure that your export file has Create Tables if not exist checked.
Admin
Fatima
How to do so?
Gwen
Hi there! I get this error from phpMyAdmin when I try to import my sql file into the new database on the live server:
#1103 – Incorrect table name
Any ideas on what I might be doing wrong?
Parisa
Hi,
Thank you for the article. I went through the steps but when I go to the website I see “Index of/” and below that I see the files and folders uploaded on the website. When I click on the files I get “Error establishing a database connection” . Could you help me with it?
tnx
Jennifer
I am also having that same issue. Have you found any solutions?
Jennifer
Actually, I don’t get the “Index of/” message or folder, just the “Error establishing a database connection” message.
I’m using GoDaddy for my hosting account and they had a slightly different process for setting up users for the database (it’s an all-in-one step, where your database name is also your username). I’m wondering if that’s what’s causing the disconnect.
I’m also putting my WordPress install in a subfolder, rather than the root directory. So I added that folder after my URL when I made my table edits. Could that be an issue?
Jennifer
I dug deeper into your website (so awesome by the way — thank you!!!) and found my solution here: https://www.wpbeginner.com/wp-tutorials/useful-wordpress-configuration-tricks-that-you-may-not-know/
I changed the localhost in my config file to my ip address and that solve it.
AWASAE
i think you guys have your website files not immediately inside public_html directory! i think you have the in a folder inside public_html
go inside the folder select all files and move them a step in the root directory
WRONG: public_html/AFolderContainingAllFiles/{allfiles}
RIGHT: public_html/{allfiles}
Shawn
Correction to your mysql query:
UPDATE wp_posts SET post_content = REPLACE(post_content, ‘localhost/test/’, ‘www.yourlivesite.com’);
should be..
UPDATE wp_posts SET post_content = REPLACE(post_content, ‘localhost/test/’, ‘www.yourlivesite.com/’);
(The forward slash was missing)
WPBeginner Support
Shawn, thanks for pointing this out. We have updated the article.
Admin
Anna
Hi,
I created a new WP site for an existing URL where the old site is currently active. I need to test the shopping cart/payment gateway of the new WP site using an SSL, which resides on the existing site. So I created a sub-folder and migrated the new WP site to this folder from MAMP. I can access the login page, but after logging in, I get a 404 “wp-login.php was not found on the server.” I checked via ftp access and it’s there in the folder. Seems I need to update something else. Or, can I copy the SSL folder to my MAMP so testing can happen locally? Thanks for any suggestions.
Anna
swati
After doing same steps as per your article i am able to live only home page but with no images and slider..along with this my other pages are not live on localhost…it gives same error for all inside pages that not found on this server..plz help me…
WPBeginner Support
Can you access the wp-admin area? If you can then go to Settings and fix your site and home URL options. Also check out this article to set correct file permissions for WordPress.
Admin