I have a simple php+mysql webhosting account where currently a simple static site is serverd. Now I want to switch to WordPress, install, setup, configure and test everything and once everything is right, I want to flip a switch and then the new WordPress-based site should be served on the same domain.

I am new to wordpress is there anything I need to watch out for or is there a good tutorial about this?

For example: From other CMS I know they (especially the plugins) were rather picky when changing the root (sub)domain afterwards.

5 Answers 5


While this might be not the easiest task for a beginner, it is very well possible – with a little help from some plugins.

In a similar scenario I would usually install WordPress under a subdomain. When everything is looking ok to launch, I would recommend to first (always!) make a backup of everything. You can then change the base url (domain) either through the admin area in WordPress, which can be a bit tricky because once you switch you will get an error message. And you're logged out. But that only means that the domain was switched. I actually prefer to change the domain name via phpMyAdmin directly inside the options table instead.

Finally there is one important step to take: WordPress writes all the links (inline page links and image urls) including the domain. So your site may first look a bit terrible, since no images are found – and inline links point to the old (sub-)domain. Using a plugin like Better Search Replace can be of great help to find and replace the corrupt urls. You simply have to replace the old url string (e.g. "http://subdomain.example.org") with the new url string (e.g. "http://example.org"). That should do.


Assuming your domain is mydomain.org. Instead of installing WordPress under a different domain (wordpress.mydomain.org) you could install WordPress on your local machine (using XAMPP MAMP or a virtual box) and resolving the original domain to your local computer by editing your systems host file and add the following line:    mydomain.org

Now every request to mydomain.org (from your computer) will be resolved to your local host (everyone else will still see the original static page, of course). This way you can configure WordPress as you want without the necessity to perform search and replace on the database once you switched to live.

The last step would be to set up WordPress (copy the files, setup wp-config.php) and migrate the database dump to your web host and remove the entry from you hosts file.


If you are a beginner in WordPress, your best option would be to use a plugin like Duplicator. This allows you to move your entire site to the new location and change all URL's at once. Please avoid manually changing URL's in your database as that can be tricky, and it's easy to overlook some of them.

Duplicator will take care of everything. Here's a good tutorial video if you need one.

In case Duplicator doesn't work on your server, you can also try a similar plugin: All in One WP Migration

With these plugins, you can create your site on your own system or another (sub)domain. Then once it's finished you can make the transfer.


I love WordPress, It is easy to use and gives me a lot of flexibility to play around codes. You know, All codes are opensource. So I can learn, make changes as I like. Even a newbie WordPress can be easy to use. If you keep using WordPress for a few days you will find that you are in love with WordPress as well!

I personally follow following steps for static site to WordPress conversion....

  1. Do a Google with this.... site:domain.com
  2. I get all the URL that indexed by google and I make a xl sheet
  3. I install WordPress on a directory like this domain.com/wp
  4. I make sure the new WP installation is search block from here Settings >> Reading >> Discourage Search Engines
  5. I develop the site there.
  6. I use 301 redirect plugin to move old URL to new URL
  7. I make the site live by changing Site URL and Home page URL from here settings >> general settings
  8. I move all the files from "wp" directory to root and keep a backup for all the root fils
  9. I use better search and replace to replace this url domain.com/wp to domain.com
  10. Now I need to enable search engine to index your new WordPress site
  11. I double check all the 301 redirect is done correctly. It is really important if you do not want to loose any SEO ranking for your static site.
  12. Finally I am done

It is fairly easy for me and I believe most of the developers love this procedure. but if I would not recommend you to follow my steps if you are not familiar with FTP and basic WordPress usages.

Hope this helps.

Sabbir H


Wordpress is generally fine as long as you change the siteurl and homeurl in the database.

  • Are these still the correct instructions for changing them: codex.wordpress.org/Changing_The_Site_URL ? It doesn't mention a "homeurl"
    – bitbonk
    Commented Jun 22, 2016 at 14:01
  • Yes they are still the most up to date.
    – J. Davis
    Commented Jun 22, 2016 at 14:02
  • And with "homeurl" you mean what is called "WordPress Address (URL)" in that article?
    – bitbonk
    Commented Jun 22, 2016 at 14:03
  • Please note that not all of the links in your database will change if you change the URL in admin settings. It's better to use a plugin like Duplicator to move your site, which will change all the links in the database for you.
    – Forza
    Commented Jun 24, 2016 at 21:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.