i want to move my wordpress site from (alpha.domain.com) to (domain.com). i have already old website on domain.com which is in php . what should i do ? any changes need to be done in database? So need your advice.
-
explained here http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_Within_Your_Site – atinder Jul 16 '15 at 08:02
1 Answers
As atinder has mentioned in the comments, see here for official instructions from Wordpress.org. However, I would like to highlight the key points:
You need to move backup your files and database firstly, via cPanel/FTP/pointing the new URL to the correct directory. (this is the easy part)
Once you have moved them to the correct location, you will need to do the following to make sure that your URLs are correct:
Update Base/Site URLs
In phpMyAdmin or your preferred MySQL database manager, go to the wp_options
table and change siteurl
and home
to your new URL. These two options would usually be the first two rows in the table.
Update hardcoded permalinks
Depending on what themes and plugin you used, you will also need to update hardcoded URLs in your posts and options. I recommend backing up your database before doing a full search and replace (to replace old url with new url), as serialized data will break if you simply do a raw search and replace.
If you are certain your database doesn't contain serialized data in wp_posts.post_content
, wp_postmeta.meta_value
, wp_options.option_value
(simply do a search first to confirm), you may safely proceed with an SQL query as outlined here. NOTE: AT YOUR OWN RISK!! BACKUP FIRST!!
You can see this section from the instructions for plugins that will help perform safer search and replace.