I have a webpage hosted in 'www.example.com' (for example) and a domain 'www.domain.com'. My problem is that I do not know how to point configure WordPress and make my page available online.

I've already tried changing the site address (www.domain.com) and the WordPress address (www.example.com) in General Settings and also from wp-config.php. I've also tried setting up apache virtualhost in apache2/sites-available but still nothing is working.

Any clue what do I need to do to get my website public?

Thank you

  • Can you please clarify which domain you would like your WordPress site to use? Is it correct you would like your site available via both www.example.com and www.domain.com?
    – Andrew
    Jan 12, 2018 at 16:09
  • Www.example.com is my hosting server and the domain name is www.domain.com. thank you.
    – Aleksandra
    Jan 12, 2018 at 19:29

2 Answers 2


Directing a new domain to a site the following components be configured:

  1. The DNS records for your domain are configured with the IP address of your hosting provider. A records are the critical records and are usually used in combination with CNAME records. Your hosting provider's documentation the correct IP addresses to use, and your domain registrar's documentation for updating DNS records.
  2. Your web server must be configured to receive requests from your domain. Most hosting providers use Plesk or cPanel both of which provide options to add new domains to your server with having to create VirtualHost entries manually. Search your hosting providers documentation for adding new domains to your account.
  3. The WordPress codebase must be located in the directory created by the step above.
  4. A database and a database user has been created for your WordPress site and the wp-config.php file updated with these database connection credentials. This is usually done via PHPMyAdmin or other tools provided by your hosting provider. If you have an existing WordPress database you can use PHPMyAdmin to import it.
  5. Visit your domain in your browser to run the WordPress install if it's a new site, or view the existing site.

Getting started with WordPress provides a wealth of information on these topics.

If you have the above in place and still receive errors you will need to post more information about your specific setup and the errors you're receiving.

WhoIs Lookup is a good tool for finding information about your domain registrar. What's my DNS is a good tool for viewing your current DNS records.

  • That was my problem and your solution definitely worked! I tried to vote you but unfortunately I still do not have enough reputation to do so. Thank you very much for your help!
    – Aleksandra
    Jan 15, 2018 at 10:59
  • Glad to hear this info helped. I appreciate you wanting to upvote, but marking my answer as the accepted answer is enough.
    – Andrew
    Jan 15, 2018 at 11:22

If you're just planning to change the domain names while remaining on the same server then all you've to do is to run this query over your WP DB .. Make sure your old url and new url doesn't have trailing slashes and always take backup of your DB before making any change!

UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');
  • Still nothing. When I type newurl it doesn't return anything. Should I need some configuration in apache or whatever?
    – Aleksandra
    Jan 12, 2018 at 15:01
  • Please explain in detail what server configuration are you using right now! Jan 15, 2018 at 9:23

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.