In the last two chapters, I talked about Installing WordPress Locally and Building Custom WordPress Theme. This chapter will cover exporting your local WordPress to a web host. Assume you are done with the local WordPress development, it is time to learn how to export and import WordPress. Then you can keep the local version for backup purpose and future development (ie. testing new themes, plugins, and upgrades).
Login to your local phpMyAdmin, select the database from the dropdown. Click on the Export tab:
Open the database SQL file with a text editor. Find and replace all local URLs with your domain URL (eg. replace all "http://localhost:8888/mysite" with "http://www.yourdomain.com").
Login to your server cPanel, go to MySQL Databases, create a new database and assign a user. Now go to phpMyAdmin, select the database (the one that was just created) from the dropdown, click on the Import tab, browse the SQL file and click Go.
Upload the entire WordPress folder to your server.
On your server, open the wp-config.php file. Change the database details to reflect your server settings.
Go to your website and everything should work perfect.
Aaron
Um, how about copying your theme over and then using the wordpress export/import feature?
Nick La
@Aaron – Yes, you can use the export/import feature built-in WordPress, but then you have to re-do the settings and re-activate the plugins.
Sanny Rizky Jatnika
mmm…interisting enough, especially in replacing SQL script text with text editor like notepad, thank’s alot
David Hellmann
recently i moved my page from the dev server to the final server, it’s really easy. good tutorial series nick.
Josh
Thanks again Nick!
Masey
I just get a blank white screen when I go to the new blog again after going through all the steps above. I’m stressing out that I’m never going to get this to work for me… :(
klevo
If you’re using mod_rewrite permalinks and moving from localhost/my-site to my-site.com you’ll also need to modify the .htaccess file in WP root.
Brandon Dove
@Masey You just need to reactivate your theme on the design page.
rossella sferlazzo
Thank you !
http://sferlazzorossella.wordpress.com
podarok
strange info about local url replacing 8(
I always think that wordpress is good enough do not store absolute URLs
dev(Www.iHaCK.ASIA)
Thank for the tutorial again
Chris Taylor
I would have thought another benefit of doing this is it will copy over things like category ID’s which will save you having to search your theme for where you’ve excluded cat’s etc.
Handy post btw, thanks very much!
ruben
What about using the real domain as local domain so you don’t have to do any editing while migrating?
Go to:
C:\Windows\System32\drivers\etc
and open the file “
hosts
” with notepad.Then add the domain for each site your develop:
127.0.0.1 www.example1.com #For browser access
127.0.0.1 www.anothersite.net
127.0.0.1 www.yetanothersite.org
Install xampp (I don’t explain that):
And then go to the folder:
B:\xampp\apache\conf\extra
Then open the file “
httpd-vhosts.conf
” with notepad.Under the document you see this:
DocumentRoot /xampp/htdocs
ServerName default
Then add the following (note that you use the right foldername for document root and server alias to get it right:
#Note that example1 is the folder name which can differ for
#the used file name
DocumentRoot /xampp/htdocs/example1
ServerName www.selectedimpact.nl
ServerAlias localhost/example1/
DocumentRoot /xampp/htdocs/anothersite
ServerName www.anothersite.net
ServerAlias localhost/anothersite/
DocumentRoot /xampp/htdocs/yetanothersite
ServerName www.yetanothersite.org
ServerAlias localhost/yetanothersite/
[Note that you disable the domain name in the “hosts” file when you want to see the “real” website.
Have fun with it!
ruben
oops. in my previous comment wordpress swallowed parts of the code so its not usable in the httpd-vhosts.conf file.
So you need to put everything between the usual brackets like is used in html and in this example I replace it with [ and ]:
[VirtualHost *:80]
DocumentRoot /xampp/htdocs/example1
ServerName http://www.example1.com
ServerAlias localhost/example1/
[/VirtualHost]
etc. for the other sites you want to add.
Fumin Yang
Good tutorial. Definitely want to mess around with things on the local drive before go live.
Joey
Thanks so much… very excited to finally get my own wordpress theme up
TheFrosty
Simple clean tutorial, nicely done!
Michelle Lana
HI Nick – If I wanted to integrate a wordpress blog into my website – I can still follow this tutorial so I can just write the blog directly in my site once I follow these steps correct? I just want the WordPress directly in my site – like: http://www.mysite.com/blog – is this ok? Let me know! Thanks again. Great tutorial!
Katey Mangels
Awesome Tutorial! I think I’m going to have to change my website to a wordpress site!
Nick La
@Michelle Lana – Yes, just install WordPress in a new folder (ie. “blog”)
ffranz
Hi Nick, following step 2. (Find & Replace All Local URLs) It also imported categories, links etc..?
Importing the file usually those features are not imported or wrong!
thanks
http://wallpapers.ariunbolor.org
Do you have a more tut’s about export/import?
3lab_VJ
hmmm, thanks for this timesaver…
i made it a couple of times like this tutorial, but didn’t thought about to open the sql file in the text editor and use the really basic and timesaving function “find and replace”…
oh, sometimes it is hard to see how easy life could be… ;-)
good job. greetings from kiel/germany
Tom Lewis
Hey, thanks for the timesaver! =]
Im just getting into wordpress, so this will help me comign from my local server’s.
bweb
Simple and easy to learn. Thanks a lot.
Steve Edge
I have just explained this very process to a colleague, so I am really pleased to see an article written about it should I need to explain it again.
Tom
WP rocks. Thanx for the post.
rossella sferlazzo
I’ m trying to do that…..
http://sferlazzorossella.wordpress.com
在法国
My god I should have see that before…
Web Major
An easy how-to, but pretty important stuff… Just moved from Dreamhost to Media Temple and it was a PITA to move all the DBs…
I wrote an article about it: http://www.webmajor.com/2008/11/leaving-dreamhost-sort-of/
Michelle Lana
HI Nick, if I am doing this for someone else – and integrating their blog into their site like I mentioned earlier, do they need to download anything in their part? I am creating it on my mac, they are on a pc- once I am done with everything and they want to post now on their blog – do they need to do something first? Can you let me know? Thanks Nick. Really appreciate it!
paluh
Useful, thanks a lot for the tips. best
Carlos
Great tip!
insic
very useful article. thanks
spencer
one thing you didn’t mention… you must also find and replace the e-mail address you used when creating the wordpress installation… if it’s different, that is. If you don’t do this you can change the admin e-mail setting in wordpress, but I ran into a problem because somewhere in the database it held onto the old e-mail address and was sending site message to the old e-mail address… just fyi
Naufal
WDW ajiiip!
freelancers for hire
great tips, thanks
tehfail
WordPress is epic failure, stop pushing a craptastical cms
Willy Wonka
This actually is easier than it sounds. Thanks dude.
kiran
Very useful tips.Thanks for sharing.
Jesse C.
You know, searching and replacing the sql file is such a simple perfect idea – that I have never used. I hunt and peck through phpmyadmin to change the urls. This goes into the “Why didn’t I think of that!” file.
Thanks so much for sharing. Your posts are always worth a look, even when they focus on things that I think I know how to do…
Jon Williams
Another informative article. I’m still not personally sold on WordPress but I do understand why it is so popular and I can appreciate its ease of use. Keep it up.
Alekos
Thank you for sharing your knowledge, it’s highly appreciated.
Question tho – What kind of font are you using?
Thank you
CMHB
I still think WordPress is the leading CMS for standard blogs, which is mostly down to its simplicity, wide spread support and plug-ins. There are others I like though such as MovableType, which handles multiple blogs very well. Anyway, thanks for the tutorial Nick. Very useful.
– CMHB.com
william doyle
Great Tips
Thanks
derekbender
get series on wordpress. Very helpful. Thanks!
ernie
I got lost right away, because in step #1 it calls to log into phpMyAdmin. The screen is totally different than the one shown. I am using PHP 5.2.6 and MySQL 5.0.51b.
Apparently the layout has changed considerably, making the first part of the instructions useless because there is nowhere to go once the tables have been selected.
There is no Structure field, to tick “Add DROP TABLE / DROP VIEW”. There is however a “Create new table on database wordpress” field that requires to be filled in along with “number of fields” before “Go” can be clicked.
So you see that I am unable to continue until that gets clarified for me. Would it be possible that the instructions be updated using the most current PHP and MySQL?
Thanks,
Ernie
Jon Williams
Thanks, good stuff. I’m feeling a little WordPressed out though.
joao
This actually is easier than it sounds.
I had so much troubles in do this in my blog, i almost quit!
Chris Raymond
I would like to know how to do the reverse: export my remote wp install to my local Mac to test out changes, etc, while not live to the world.
Nneon
Hey Nick,
Great set of tutorials you’ve put together here… Absolutely love wordpress and all that it’s able to achieve.
Just one last step you might like to cover would be a tutorial on upgrading your version of wordpress?
Rahul
I think this post would be very useful for any newbee or to be bloggers who would like to use the world’s best wordpress as their blogging platform.
This is very helpful and very useful as well.
osu
Hi,
Not sure if this has been mentioned yet, but before importing your .sql file into PHPMyAdmin on the new site, you should search through it with your code editor and change all instances of ‘http://localhost:888/’ to ‘http://www.nameofyourdomain.com/’ so that any images etc. that reference your localhost environment reflect your live environment.
If you don’t do that, any images etc. in your content probably won’t appear because they refer to localhost and not your live URL.
osu
Ah,
Stupid me, I didn’t read your tutorial properly! I see you’ve already mentioend about localhost!
charles
wow what an awesome design!
João Henrique Ferreira da Mata Ferreira da Mata
Thanks Web Designer Wall !!!
http://www.swebstudio.com.br
Nneon
Scrap my last comment about writing an article about upgrading your version of wordpress…
With the release of WordPress 2.7 it’s as simple as clicking a button :P
David Costales
Thanks for this entry!
joao
This actually is easier than it sounds.
my blog
devlim.com
Great tutorial, thank for teaching
manS
Tq very much for the tutorial… Great..
Salva
Dude “YOU ROCK SO HARD!!!”
I will vote my socks off for you – thanks for this great tutorial series.
Web Designer
This is a very useful tutorial as I recommend everyone who has a word press theme to switch to your domain name because you never know when word press decides to reactivate your blog.
Goofydg1
Nice tutorial. These are helpful. I had done the url replacement using SQL but hadn’t thought of the text editor option before. For those reading, be careful what text editor you use as it may change the quotes and lead to an issue.
Jade Cadelina
Excellent tutorial. :)
wen
This is very helpful! Thanks very much
vet on the web
thanks. nice post, great tutorial.
you can try this step to import your wordpress blog to joomla powered site/blog
John Serrao
Great tutorial over exporting WordPress but there needs to be a step six, especially for noobs.
6) Go to Settings > Miscellaneous > Store Uploads in This Folder
Change server value to:
/wp-content/uploads
If you fail to do this, you will get errors whenever you try and upload multimedia onto your http live site via the wordpress uploading interface.
Great blog by the way,
j
Christopher Francis O'Donnell
Thanks for the great post, Nick! :-)
Jan
Awesome tutorial, thanks Nick! :)
Chetto
hi everyone…i’m having some problems with a blog…I’ve followed many times this tutorial…everything works perfect locally.
When I upload it to my host, then something goes wrong…
Pages never seems to work…
This is what i’m talking about… http://www.justsimpa.com
Thanks in advance to anyone who’ll answer…
Brian
I’m trying to move my wordpress blog to a subdirectroy (http://www.brianandlindsaymiller.com/hardwalking) but getting a database connection error. I’ve modified the .sql file to reflect http://www.brianandlindsaymiller.com/hardwalking/, and the wp_config file. The blog works if I upload it to the root public_html directory but not the subdirectory. Is there something I have to do to the mySQL db or something?
I’m doing this because it will be used under an add-on domain once I get it uploaded and tested. I’ll then change the DNS.
christoball
Hey Brian, I’m having the same problem…would the kind gods of the web designer wall please assist us?
jeff mccown
I’m having problems with this: Login to your server cPanel, go to MySQL Databases, create a new database and assign a user. Now go to phpMyAdmin, select the database (the one that was just created) from the dropdown, click on the Import tab, browse the SQL file and click Go. Can anyone help?
Fritz
Brian and christoball, under Settings->General Settings there is a place for Blog Address. Did you put the subfolder name in there? Just a guess.
Brian
Fritz, If I’m not mistaking…by updating the .sql file with the new URL this should update the field you are referring to. So I did update all the URL’s in the .sql from my localhost to the new domain/subdirectory. If I’m wrong…I still can’t change this field because I can’t even login into WP without getting the database error. So in other words…I can’t get to WP in anyway because it won’t connect to the database.
Does this have something to do with the .htaccess file?
jeff mccown
I’m using a mac and mamp. Is there anything like Cpanel for the mac?
Please help:)
หาเพื่อน
Hi thanks for this tutorial.
but i got a some problem wordpress plugin such as wordpress sitemap
baby-bride
I do like this post very much, thanks. I can work off-line now.
Calliope
I have followed the tutorial so many times, but its not working for me I am afraid. it apprears that only the home page is working and nothing else, the links for pages, images are not working WHATSOEVER
I have been on this code for about a week now and I can’t find a solution, I even replaced all the links in all localhost/mysite files with my website domain (because you see I want to see my site under the domain, not domain/wordpress folder); but alas I am bereft of Ideas
please any suggestions are more than welcome here!!!
Lee
I’m having the same problem as calliope, everything works perfectly locally but once I moved the site to the server none of my links work.
I was having trouble with importing the database to the server, so I did a fresh install and imported all my posts and pages, they are all showing fine in admin but any links to pages or posts return a 404 page not found error and even previewing posts or pages from the admin does the same thing.
I’m pulling my hair out, any ideas?
jelm
Hi, what´s is wrong when the css not seams to be active and when a click on a link it point me to my http://www.xx.com and not to my subfolder. where everything is placed.
Nimar
Thanks—you just helped me loads!
Murray Anderson-CLemence
Thanks a million, it on the worked second time. That’s excellent for me.
I had to make sure step 2. (Find & Replace All Local URLs) was entered correctly.
From the bottom of my heart thank you. Muzza!
than
Comment Guidelines
Gregory
If you have uploaded any attachments you will want to change the path(s) to the file(s) as well (/path/to/local/site/test.jpg -> /path/on/host/server/test.jpg).
When make any replacements you need to use caution and watch for changes made in a serialized value. It is likely you will be changing the length of the string and this may cause the serialized value to break.
If you do make a change to a serialized value you simply need to update the string count (s:5:”tests”; 5 in this case) with the correct count.
Mustafa Hajjar
yes man,
thanks a lot
me too i can work offline
my best regards
aryawan
Thanks .. your guidance is very helpful for a newbie like me.
Adrian
well if you have a BIG database, it will be a little annoy to open de .sql and chage and replace..
I think is better doing this .
After you import your DB to the new location…
then you should make a quary.:
To update WordPress options with the new blog location, use the following SQL command:
UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-domain.com', 'http://www.new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl';
After that you will need to fix URLs of the WordPress posts and pages, which translated from post slug, and stored in database wp_posts table as guid field. The URL values in this field are stored as absolute URLs instead of relative URLs, so it needs to be changed with the following SQL query:
UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com');
If you have linked internally within blog posts or pages with absolute URLs, these links will point to wrong locations after you move the blog location. Use the following SQL commands to fix all internal links to own blog in all WordPress posts and pages:
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');
Browse through WordPress blog to check if everything is okay. You also need to re-login to WP Administration as authentication cookie has now became invalid due to different domain.
Remeber always to have a backup
see’a
Mindy
Great Tut.
THANK YOU FOR ALL YOUR TIME DOING THESE FOR ALLLLL OF US! Unfortunately, I am having an error though when I try and import the db ‘localhost.sql… I have tried a few times now – It says:
Error
SQL query:
—
— Database: `information_schema`
—
CREATE DATABASE `information_schema` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
MySQL said: Documentation
#1044 – Access denied for user ‘root’@’localhost’ to database ‘information_schema’
Any help would be so appreciated.
Thanks!
shane
what about if i want to set one up in another folder say .www.example.com/themes
the themes folder being the folder where i would want to put wordpress in, anything to watch out for?
horoskopai
thank you
it worked with me very well
Andrei Gonzales
WordPress 2.7+ finally has an import/export wordpress option. First step is to upload your theme to the themes folder on your server, then on your local host, export the wordpress file (it’s an xml file), and on your live site, upload it. Voila, done.
vishal
Hi! I’m planning to move from one server to another and I’m using drupal. Do i follow the same process for drupal as well?
Jenni
Hi, you said this is for backup purposes. So, if someone creates a new post in WordPress, will it automatically show up in the website or does it need to be imported each time? I am new at using blogs and trying to find better ways to incorporate them into a site.
Thank you!
Stephen Ng
Thanks for the post. You made it so easy! But I read it somewhere. It is best that you uninstall the theme first.
Calvin H
You rock! Thanks for the step-by-step. It was very easy with your help. So many other tuts are way too technical for designers. I created my first theme locally and put it up live today!
Thanks again! Calvin
1Q8
Thanks man, this is great. I learn a lot from your tutorial, in fact, I created my web following your guide here starting from install WordPress Locally, Useful WordPress Plugins, and finally this one… Export my web.
You Rock!
Adam Kiu
Hi,
Thanks a lot for this – I was able to export/import my WordPress but at first my images weren’t being uploaded to the right place (I use Windows Live Writer)
The problem was that in my .sql file, the ‘upload_path’ was hardcoded to ‘xampp/htdocs/wp-content/uploads’, which lead to my images being uploaded to the wrong place. I had to replace this with my siteurl (which was not detected when I did a localhost find and replace) to get it working.
It cost me a day in coding so I’m hoping that I can help shed some light on those who come across the same problem.
Excellent tutorial though! :)
Cheers,
Adam
andrew
Exporting Problem at PhpMyAdmin
I got this problem after click the GO button:
export.php: Missing parameter: what (FAQ 2.8)
export.php: Missing parameter: export_type (FAQ 2.8)
Please kindly explain how to solve this problem?
Please email your answer to [email protected]
Keith D
I’m struggling through this series and have just come to this tutorial. Perhaps I should know how but…
“Login to your server cPanel, go to MySQL Databases, create a new database and assign a user.”
Is a bit much for me.
I’ve checked out a few C panel / WordPress tutorials and I’m not giving up.
I appreciate your time and effort, but this one may be too complicated for me
Wish me luck
Keith D
ben
thanks for this great tutorial! i really had some problems regarding the exporting of the database. its a good thing that i have some knowledge with database manipulation.
and also many thanks for this post again! =)
wpdigger
its a good thing that i have some knowledge with database manipulation.
…
..
Thanks for this great tutorial!.
Watin
First of all, your web site so beautiful and thank you for a good article.
Search24online SEO Services
Very affective process.
unisa81
thanks for your good article
A.S.
Finaly a clear and simple tutorial on how to export a local database.After pulling out my hairs the last two day searching for a tutorial that is easy to use i`m praying on my knees to thank God my database is finaly up and running and its just so simple.Wordpress should implement this tutorial in theyr codex!Thanks a bunch.
Mark
I am having the same problem as Mindy. My error reads: ##1044 – Access denied for user ‘mark’@’10.%’ to database ‘information_schema’ .
Do you know how to fix this? I already have WordPress uploaded on my host server which may be the problem. However, I would like to do this without reinstalling it. Any suggestions?
clovek57
thank you for this tutorial..very helpful
jonathan
This tutorial is great! I was worried that exporting the database and importing to the new host wouldn’t include all of the pages, comments, etc. I was afraid I would have to export the XML within WordPress as well. But that wouldn’t work because the exported XML file was too large (over 2MB) to import to the new host. So I’ll give this a shot. Thanks again!
cennetevi
these are awesome!
thanks for putting in the effort to get this list together http://www.cennet.gen.tr
Bill
Very clear directions. Thank you!
FYI for other readers:
A nice program to use instead of phpmyadmin is “Sequel Pro” for Mac OSX.
fanboi
You saved my blog! I needed the export settings to make .sql file – (moving blog after it went down with no backup).
THANKS!
Aoobi
Finaly a clear and simple tutorial on how to export a local database.
Konrad
Overall a good tutorial, I see many are pleased with it. However, partially I find it hard to follow and actually the whole procedure didn’t work for me. Looking for a solution at the moment.
sopheak
Hi, This tutorial is good to help me more to do it.
And I have one problem after I exported database then I explored it. It display two lines errow in .sql file
export.php: Missing parameter: what (FAQ 2.8) export.php: Missing parameter: export_type (FAQ 2.8)
does anyone know what I’m doing wrong?
Thanks
bagsin
thank you for this tutorial..very helpful.. I learn
Cyrus
Great , Exporting and Importing WordPress
Great article. CSS saved web design
Cyrus
Visit http://www.psdtoxhtmlcoder.com
Tjeerd van Sas
Hi Nick,
It is much easier to go to the wordpress-admin panel -> tools -> export.
The file which is created that way can be imported at the new site (admin -> tools -> import)with an existing installation. (It is advisable to delete all the pre-generated categories, posts and replies).
philippe Poivre
Thanks ! it worked great…. I only lost maps I did with mappress plugin…
All the best
Mette
Hi!
Thanks for making a tutorial. I have followed your instructions and I have more or less transported my wordpress from one domain to another domain on the same host server. The home page loads without problem. (I only lost the about information)
However I have other more pressing problems. I keep getting this error message every time when I want to access individual pages or posts such as http://www.villmarksporten.no/kennel:
404 Not Found
The requested URL /kennel does not exist
In WP admin I see all the posts and pages. But somehow the database has not constructed the pages in the process.
Anyone have any idea what is going on and tip how I can solve it?
If I use keywords and the search button I get the posts or page. For instance if I search for oppdrett, a key word I know is located on the “kennel page” I have more luck and I found this entry:
http://www.villmarksporten.no/?s=Villmarksportens+oppdrett give me the page. But it seems like MySQL has not made entries for the permalinks that can be seen inside Wp admin.
I hope I am able to make myself clear.
Thanks!
Drew
Thank you for your easy to follow articles on WordPress. Installing and building themes was simple due to your excellent instructions. Thank you VERY much.
Mike
Thanks ! it worked great…. Come On
Mike
Overall a good tutorial
panel radyatör
good it works
Andrea
I followed your instructions and everything went well (so thanks very much!) except for one problem that I solved myself, so you should add another step to do before uploading the wordpress folder via ftp:
in case someone has set up permalinks, the .htaccess file has to be modified.
owtsaide
great!!!
Zoho
Thanks for sharing. Helped a lot.
pyemachine
excellent help these articles. Created a wordpress theme and went from local to live based on these articles.
panel radyatör
nice tutorial i will translate my language
Doug C.
There’s no widgets in the GlossyBlue theme. Bummer.
panel radyatör
great job bro thanks
australian real estate
Great info but my needs are simpler.Can you explain the basics of merely exporting a theme from ne of my existing blogs to my harddrive. I just want to be able to upload that same theme again and again. Thanks.
Andrew
Coffs Harbour Australia
vincentdresses
喜欢你们的设计与技术,常来看看
online stock trading advice
I don’t usually reply to posts but I will in this case, great info…I will add a backlink and bookmark your site. Keep up the good work!
I’m Out! :)
slim
喜欢你们的设计与技术. thanks
Graphist
your website theme is very beautiful.
thanks for content.
Ada Werrek
Thank you for a great tutorials, very handy and useful. I use one database for localhost and website, so I don’t have to export/import my database. Less work is better :)
dwhip
Great article (as usual) – but I’m finding that if you setup a WP site in MAMP that it still sees the htdocs folder as the ‘root’ of the site and not the actual site folder itself. Is there a way around this so you don’t have to make adjustments from the live version of the site in terms of relative linkage?
Clyde Sanchez
Hi everyone,
I just wanted to let the users who are having the 404 issue after performing the export/import that it takes a few minutes for the data to propagate.
Give it 10 minutes or so and the links should work properly. I was worried after performing the above steps, but after a few minutes the 404 issue went away…hope this helps.
Web Design
Thanks for this guide. It will help me transfer my post from blogger, as xml files are much eaasier and the only way from blogger to wordpress!
Tim
Hej there,
thanks for those three very helpful tutorials,I transfered my local WordPress installation using this, so it worked quite fine for me. Perhaps you should recommend using a MySQl 5.0 database when you are setting up your domain in the hosts portal, that’s the only issue I had to deal with.
So far
LouienatoR
why does my jquerry won’t appear in my page???? and my wordpress page is all messed up…. need help very badly…. thank you…..
Martyn Brown
You’re a star.
I’ve read loads of ‘how-to’s’ about WordPress where nobody really explains how to easily move or clone a WP site.
You’ve done it perfectly.
Bookmarked, thank you.
Guru Crusher
Do you need to change the database as well when you go through and change the localhost? Or just the local host?
Flash Arcade Games
Thanks for the info.
Also, I like the theme too.
cheers
Minnie Rodriguez
thanks a million for posting this, moving the database can feel so scary, it’s great to have such a great resource!
Minja
Web Design
thanks for the tutorial..very informative thank yoU!
Kevin
Thanks for this tutorial, although following all the steps in moving from MAMP local set up to upload to client server all I get is “Error establishing a database connection.” I have tried 3 separate times to no avail. Please advise – ANYONE!
Thanks!
Kevin
Chris Sinclair
All good from local to online. Now how would you go about duplicating a online site or moving to another domain with different database. Keeping all the images and post.
Ehthisham
Thanks a lot works like a charm …Great resource …
andy
hello.
got a problem, I downloaded the database from example1.com, I then changed all the domain names in the sql file from example1.com to example2.com and uploaded.
that was ok. I then went into the wp-config.php and changed the wordpress database name from the original number to the new database number.
the result was that I got an error message saying it couldn’t connect with the database.
I’m thinking there is an obvious oversight. Can anyone help??
andy
I just noticed Kevin had the same problem on 29th april. aren’t replies shown here?
Dave
You ROCK!!
I find myself coming here more often these days, but this post saved my life!
Thanks so much!
Dave
Debasish
It’s Sooo Useful to me.
Thanks A lot.
Mandy
Hey, thanks for the tutorial, it has really helped me out! The only step you seemed to have missed with exporting is changing the wp_options in PHPMyAdmin. See http://thethemefoundry.com/blog/xampp-wordpress/ – “a couple quick changes” heading. Just thought that may help some people out!
Jeffrey
Awesome guide! Just what I needed, I just ran into one problem I hope you can help me with. After exporting and importing the db, my content is only viewable when logged in to the admin backend. If logged out, the content is not visible.
The layout and theme are fine, but I get the “There’s nothing here.
If there were posts in the database, you’d be seeing them. Try creating a post, and see if that solves your problem” message.
Any ideas?
Jeffrey
Nevermind, I actually fixed the issue I just commented about..it had nothing to do with the database at all. This guide worked perfectly.
Pierre F. Walter
I did exactly what you did to upload my local MAMP-based site to ipublica.com, with one exception. I changed manually, using a text editor, all instances of ipublicacom:8888 to ipublica.com, in the sql file before importing the database to the server. All worked fine but I observed that the server changed my login settings to my local login settings. So thanks for the idea that I of course need to edit the config file on the server. Maybe even that I do not need to replace all URLs in the sql file, and can do this by simply editing the config file on the server? Let me try this:)
Thanks.
Pierre
Rinze van der Hoop
Thanx for the toturial. It`s work
Drew
Hi!
Thanks so much for all the help! This tutorial is the best I’ve seen.
However, I have one hang-up. I went through the steps and now when I try to access mydomain (www.edwinblue.com) the “:8888/” gets added into the address and the site won’t load.
Possible Issues:
When I setup my MAMP server I just made it “http://localhost:8888/” I didn’t include “mysite”
When I went to update my wp-config file it appeared that all the settings were already correct. ??
Lastly when you say upload the entire “wordpress” folder is that the same as the “wp-content” folder?
Someone PLEASE PLEASE PLEASE help!
Thanks in advance,
Drew
stage-drama
this post is really helpfull regarding import & export in wordpress
host
nice! I am so happy I found this…helped us a lot. thanks guys!
Vinayagam
Hello Guys,
Thanks for the info,it’s very useful for me.
Keep rocking…
WebVeins
I was worrying if this is so simple.
But you rocks..
Great Tutorial
Cheers…
Shahid
Excellent tutorial. Easy to follow, complete and very useful.
A quick question. Let’s say I continue to modify the local environment, would it be a simple matter of following all the database export/import steps again to re-incorporate?
(I’m not going to be complicating things by continuing to modify the database in the target, testing environment)
Thanks again!
dsas
asasa
Alicia
Thanks for the simple suggestion of changing URL in SQL file. I’ve been doing a query in phpMyAdmin.
This tutorial rocks. Thank you so much!
Alok
Working Bro thanks!
David
I’m having the same issue as Drew from comment #162. 8888 is being automatically added to the end of my URL and nothing comes up.
Maria Elizabeth Romana
Awesome guide. You made it so simple. Worked on the first try.
Thanks!
Maria
Mural Locator
Wow! This is really handy thanks I plan to use this technique with my website. http://www.murallocator.org
Thanks!
الاندرويد
thanks for such great and helpful tutorial
mary
I think the replica handbags the quality is no bad.
Just want to say what a great blog you got here!I’ve been around for quite a lot of time, but finally decided to show my appreciation of your work!
Chris Rosendahl
I’m working on a client’s website locally and am confused with the directions in Step 2. I’ve tried replacing just the local URL with my domain name. Do I also need to replace all instances of “localhost” with my domain name? In trying just the local URL with my domain name, I’m still getting the local links to show when going anywhere but the start page for my domain.
Find and replace all local URLs with your domain URL (eg. replace all “http://localhost:8888/mysite” with “http://www.yourdomain.com”).
nomadone
I usually replace all folder pathways in the db data as well, I found sometimes certain plugins point to old folder paths, I noticed no-one ever recommends this step. don’t you think it’s necesssary?
Katrina Tan
Hmm.. Just a bit confused about step 4: Upload WordPress folder to the server. How is this done?
Thanks for any help!
Kat
Mike
Wow, thanks this worked exactly as shown.
sarlotsn
8888 is being automatically added to the end of my URL and nothing comes up
miklejason
being automatically added to the end of my URL and nothing comes up.
Aditya
amaaaazziiinnnnnngggggg…
thanx to you…… :)
El garch
Thank you for the tutorial
sat
THANKYOU THANKYOU!!!!
Helped so much!!!!!!
Martin van Heun
Which databases has to be selected with the local phpMyAdmin?
Andi
Great Danke merci thanks.
It’s amazing
arjun
hi i am doing same but its coming a blank screen
tomtom869
Just curious, how does one go about getting the gui to display in ubuntu? I can access phpmyadmin in the terminal, but I want to use the fancy gui like you have done.
Thanks!
Melvins
Hey, you have done great job. Nice work. Thanks for that.
Los Angeles Web Design
Juno Mindoes
Great share. I have a question, Could you share more information about white iphone 4?
Henry Peise
White iphone 4 Conversion Kit is now the hottest iphone 4 piece that you should get!
@adrymcs
Great tutorial!!
Thank youuuuuuuuuuuu XD XD
Keith
Hey i did everything the tutorial told me to do, but my pages arent working. Im getting an internal server error. My front page works fine but the rest of the site doesnt seem to be connected… do you have any advice
Edgardose
It happened the same to me…. looking for answers…
Edgardose
Apparently the permalinks settings were not exported. I putted the permalinks settings back to default, and it worked.
Now we need to find out how to make the permalinks work with the other settings…
Uçak Bileti
kalmıyacak o kimsenin evinde
Ben
Thanks for sharing. Lol
db
thanks! great tutorial!
Frank
Hi,
Something goes wrong…. if I open the page, automaticly :8888 is added.
What to do?
Thanks!
Edgardose
this happened to me too, i dind’t changed the local host url (http://localhost:8888/) for the new one… step 2
Paul
For the people have the auto insertion of :8888 problem. Go to phpMYadmin on the Live server and do a search for 8888, you will see that it still appears a few times in the wp_options table, ie. for ‘siteurl’ etc. It should only appear in a few fields. Edit these fields manually pasting in your Live URL. Now, everything should work properly…
altın çilek
Thank you!! Very helpful, great technique and great explanation. And looks beautiful!!
hcg damla
Hi,
Something goes wrong…. if I open the page, automaticly :8888 is added.
What to do?
Thanks!
Amy
Everything worked just as the tutorial says! Thank you so much! : )
Marja
Does this work the other way around as well?
I mean can I make a local copy of my online site this way?
Marja
How can I use this process with 3.1? I have multisite locally, but need to move only 1 subsite online. I can export the single database, but not upload the whole wordpress folder cause it includes all my other site as well.
Please help!
Rahul
oh man, your the best. I’ve never done this before and i;ve been struggling with this problem. Got it all solved finally. I just want to say THANKS.
How To Put On A Condom | How To Get Taller
Totally covers exporting local WordPress to a web host. Awesomeness!
How To Get Taller | How To Put On A Condom
It’s more like thinking outside the box right?
Jimmy
How do I know what my host is?
OPER Rice Exporter
Very useful tutorial. Nice work!
Jon
Will I still be able to change and update my website locally, and then just upload the files to the web host?
San
Thank you very much for such a wonderful tutorial. My web hosting client was suffering how to make his WP site online. I googled and found this link. I gave him the link and he is almost successful.
Thanks,
San
GoldeN
Have learned lot from here, its time to do with my server,
Thanks a lot for valuable information buddy.
Mckara Sir
I’ve been trying to upload my wordpress but no sucess but now with your detailed description.. Perfect !!.. you guys are the best
Tyler Mulligan
There is a deep-rooted issue with this method. WordPress relies on PHP serialization for datasets stored within the database. The format of serialized PHP includes a character count. If this character count differs from the original it can unserialize incorrectly and screw up settings.
Specifically plugins and widgets are first and most obvious effected. The proper albeit more complicated method is to unserialize these with PHP, then replace and reserialize. It’s a stupid issue that could have been avoided in wordpress used JSON.
Daniel
Big thanks for this tutorial. It’s really helpfull. High FIVE!
Albano Kofsha
thanks thanks It’s really helpfull, i did it from bluehost to 1and1 and was perfect THANK YOU!
Simone
Hi,
thanks a lot.
thej
awesome… thanks guys…
Gary
I was so happy when I found this because it helped me get further than ever. However, I get this message:
SQL query:
http– phpMyAdmin SQL Dump
— version 3.3.9.2
— http://www.phpmyadmin.net
—
— Host: localhost
— Generation Time: Aug 13, 2011 at 08:18 PM
— Server version: 5.5.9
— PHP Version: 5.3.6
SET SQL_MODE = “NO_AUTO_VALUE_ON_ZERO”;
MySQL said: Documentation
#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 ‘htt
When I get to step 3
Login to your server cPanel, go to MySQL Databases, create a new database and assign a user. Now go to phpMyAdmin, select the database (the one that was just created) from the dropdown, click on the Import tab, browse the SQL file and click Go.
I’m usng MediaTemple and there is a “manage your databases” in the admin. I can easily create a new database (I believe, however, it is a ‘virtual’? database…? if that makes a difference) and there is no place to assign a user (as I already have the database for the account.
Very confusing, but I’m wondering if this is the problem.
Any help is greatly appreciated.As I say, this has gotten me the furthest in two years!
How Do You Get Rich
I am wondering if it’s easier to just upload the new custom theme into the wordpress theme folder and not mess around with any config files? That seems to work pretty well for me. Any thoughts Tyler?
adhi
Very usefull article, but i’m still need to edit my style.css file. but it’s ok now, thank you for sharing this..
Designersbrush
Thanks for this tutorial
Bhavesh
Man It solved my Problem.. Thanks
John
This has got to be the best tutorial out there…simple and to the point. Thank you, Nick for creating this. I’ve referenced to this post several times to make sure I do it the right way.
Aldren
if i read this one before it will save me from hell
Thank You, :D
Plastix
AM currently trying to create a local word press. anyways i have intentions of making it live. i installed XAMP and have installed word press. its working great locally. i want to add more stuff on it still though. well i want to know how to make it live and i want to host it myself. am not exactly a newbie to wordpress but i have never made any webpage or site live. i need help making my wordpress live. am googling some info and ama attempt some of them.
Jen
Thanks so much for the great tutorial! Worked perfectly, although with GoDaddy I had to change the host name to what GoDaddy was providing. Other than that, perfect!
Moliva
i need help making my wordpress live. am googling some info and ama attempt some of them.
Dheeraj Bansal
I am getting error code 1046 while importing MySQL database. Please help me to escape out of this error.
onedevteam
It’s nice tutorial, but i think better\easier way is to export xml file from wp dashboard, and to import it to new host like it’s described here…
http://wordpress.org/support/topic/using-importexport-when-moving-wordpress-to-a-new-host
ramzes
But there’s more involved than just the stuff that wordpress gives you with the export xml file. There is theme options, widgets, etc.
Marta
Thanks! It’s very useful, but I don’t understand: if I want to export my local WordPress into WordPress.com, how can I do that? Do I need to put the local WordPress folder into the export/import section? It’s said it only works for comments, posts, etc..
Thanks.
nepalee
hello there
it was the best tutorial i found out to import my wordpress site from older to newer one. i am still confused and did not be able to do what i wanted to do so. i have old site using all the same version of wordpress with all the plugins installed in new one, tried to import mysql using phpmyadmin but give me duplicate posts and error which ended in failure to import all my data. i replaced all my old domain name in the imported sql file using text editor as well and data base too changed. i will try again and may ask you fine people for help.
Thanks for nice post.
Ruth Gwilt
Awesome as always, Thanks. I usually hate anything to do with the databases but that made it so simple. It didn’t hurt at all!
ofir
gr8 info:) as always…
tnx!
Fren Dee Bee
Short and simple tutorial, but direct to the point, it’s what I’m looking for to transfer my other WordPress database to a new host. Thanks Nick, cool as always.
Ryan
I loaded wordpress locally, designed the site, copied the files to the server, restore the database to the webserver phpmyadmin and changed the wp-config.php config file but it will not open the wordpress page, always says cannot find the database. I rename the .php file and recreate it and add the same database info and it connects to the database but i have to reload all widgets, themes and recreate all gallaries. All files are there the wordpress site just doesnt see any of them. Its like the database needs to recreate all the tables and then it works. Any ideas? P.s its not the database info in the .php file thats wrong. Could it be the naming of the database on my local machine and the nameing of the tables on the server?
kill
Simple solution you’ve provide for the most complex process I was thinking before reading this tutorial. How to export WP database from one host to another ?
Josh @ Live Well Simply
Thanks for the helpful info… WP doesn’t make it apparent how to backup the database.
Mick
so if I wanted to download a WP theme I already have loaded on a site running live would I have to copy all the folders locally in the WP themes folder … and change the wp-config.php file ?
Mick
well when i mean copy the files locally … I mean copy the folders from the server & then load them into my local WP theme folder.. yes
Mick
maybe all I need to do is copy the Theme folder locally from the server… yes ?
cd_BE
For a theme you don’t need to change the wp-config.php.
Just copy the themes map, usually has the map the name from the theme, from the website and place it in the themes map from the new site.
When you go to your admin panel and select themes you should see the newly added theme.
cd_BE
Hi
Great site, it gives straight fourth answers to thinks that look complicated.
I tried this reversed. So I replace all “http://www.yourdomain.eu” with “http://localhost:8888/”. Downloaded the entire htdocks from my webserver to my local mac. Changed the wp-config.php settings.
But when I go to the http://localhost:8888/ site everything is blank. I think I missed something but don’t know what.
Before I did this, I had a clean WP running just to be sure that everything worked just fine. Witch it did.
James
I have completed steps 1-3 but do not know how to proceed with #4 and # 5. Can someone walk be through this? I am stressing out a bit with trying to get this done under a deadline and help would be greatly appreciated.
Nelly Naneva
Thanks for the easy to undersand report. You have answered all my questions and save me a lot of time wondering what to do.
I have one more question: if you move from one hosting (Godaddy) to another, how to preserve the mailbox e-mails and move them later on to the new mailbox with the same name?
bitkisel
Thanks for the easy to undersand report. You have answered all my questions and save me a lot of time wondering what to do.
I have one more question: if you move from one hosting (Godaddy) to another, how to preserve the mailbox e-mails and move them later on to the new mailbox with the same name?
chris
hey thanks for this :) made a development site switch a lot easier!
birgitte
Thank you so much for this easy tutorial, and for sharing your knowledge, it saved me.
I’m a first time MAMP user (and first time WP user) and this made getting my site live, not quite a breeze, but definitely do-able.
yum
i just want to ask… on step 4, “Upload the entire WordPress folder to your server” how do you upload the whole WordPress folder through phpmyadmin? Need help on that…
Anyway,
Thank you!
Jorge Psendziuk
Not through phpadmin, but via your FTP client, or file upload on your server’s control panel. :)
Alquiler yates Ibiza
Upload the entire WordPress folder to your server” how do you upload the whole WordPress folder through phpmyadmin? Need help on that…
Jorge Psendziuk
Not through phpadmin, but via your FTP client, or file upload on your server’s control panel.
Rebecca
i have followed these instrucitons (skipped the custom template since i am using a purchased templagte) but my phpMyAdmin screens look different than yours and i can’t follow them since things are not the same. for example:
OK -Under the Export field, make sure all tables are selected
NO – THIS IS UNDER THE OPERATIONS TAB- Under the Structure field, tick “Add DROP TABLE / DROP VIEW”
NO DROP TAB, its under the export tab and then i have to toggle the custom field Tick “Save as File”
Then click Go and it will prompt you to download a SQL file
ok…then i go to the next set of instructions and import the data base and of course it shows me ERROR…can’t go any further. i have done this 500 x…..
can you help me?
MAMP version 2.1.1
Mac OSX 10.6.8
Rebecca
this is the error:
Error
SQL query:
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
—
— Database: `ftcWP_0915`
—
CREATE DATABASE `ftcWP_0915` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
MySQL said: Documentation
#1044 – Access denied for user ‘rburns’@’10.%’ to database ‘ftcWP_0915’
sasha raskin
Thank you so much! This is the best manual on the net. Much better than worpdpress’ manual itself and better than my hosting company’s site, and that’s supposed to be their job. I use this manual with any new site i build, juts to make sure i do everything right.
For those asking how to transfer the files, best option is the use the free ftp software FileZilla. It’s all drag and drop and never does any problems in copying files from your computer to the storage server. The configuration details you can get from your tech support of the storage site.
Thnx again!
sasha
uma
how to extract wordpress file in html.not xml please solve my problem….
Abhi
Lots of Confusion as a Newbie But this time Got An Idea
Thanks Admin
shan dmello
I think you need to amend all your tutorial for the latest version of the WP and lot more changes are arrived to be updated.
else the content available on your site confuses with what is latest installed.
please note to update to up to date,
Vail Joy
Hi Shan!
The date on this article is your best indicator that it probably doesn’t apply to the latest WordPress anymore. As time goes on, more updated articles will be added or Nick will revisit older ones to update them as he can. Cheers!