I was trying to move WordPress website to another domain. Ex: http://www.demo.com to http://www.localhost/demo.... and i have taken xml file backup from c-panel.All the tables are there.And changed url in editor.
When i imported xml file into wordpress dashboard, Pages/posts are not uploading. Only default page and post are there Same problem.
Can Anybody guide me what mistake i am doing and what is the solution ??
Thanks in Advance
http://codex.wordpress.org/Moving_WordPress
Navigate to Moving to a New Server.
http://codex.wordpress.org/WordPress_Backups
http://codex.wordpress.org/Backing_Up_Your_Database
Here's what I do whenever I have to move a site to a different domain(or from localhost to somewhere on the web):
/wp-admin
,/wp-content
,/wp-includes
and all files in the root directory, otherwise copy them to your computer:
Replace the
{%...%}
placeholders with the corresponding values as follows:{%TABLE_PREFIX%}
is your table prefix, as defined inwp-config.php
{OLD_URL}
is the old URL where the site resided. I usually skip thehttp://
part and the trailing slash(some paths are saved with, some without it, so it's safer to do it that way), so if your site used to be onhttp://www.demo.com/
, you would replace{OLD_URL}
withwww.demo.com
{NEW_URL}
is the new URL where the site will reside. I usually skip thehttp://
part and the trailing slash, so if your site will reside onhttp://www.localhost/
, you would replace{NEW_URL}
withwww.localhost
. If the new location is a sub-directory(for instancehttp://www.localhost/example/
), you will replace{NEW_URL}
withwww.localhost/example
.Once you're done with all of that, just go to your new installation, log-in to the dashboard, go to
Settings > Permalinks
and unless you see a .htaccess permissions error, you're all set :)If you can't access the DB via phpMyAdmin, or you can't make a back-up of your files, consider using a back-up plugin