Skip to main content

Building a site for client w/ different hosting

Comments

4 comments

  • sysnishit
    Hello, You don't need to ask client to point A record to your server IP. Just add IP and domain in hosts file on your local PC so site will resolve through your server for your PC. Path to host file is C:\Windows\System32\drivers\etc\hosts . Once you add your server IP and site name in hosts file, ping domain from command prompt and you will find it is resolving from your server. You need to open this hosts file in notepad as administrator.
    0
  • zedsweb
    Hello, You don't need to ask client to point A record to your server IP. Just add IP and domain in hosts file on your local PC so site will resolve through your server for your PC. Path to host file is C:\Windows\System32\drivers\etc\hosts . Once you add your server IP and site name in hosts file, ping domain from command prompt and you will find it is resolving from your server. You need to open this hosts file in notepad as administrator.

    Thanks for replying @sysnishit! A follow up question for you as this is very new to me: Are you saying by doing this I will be able to install WP in the cPanel account, and have it work on my PC so I can create the site, and then when complete finished all I have to do is back it up and have them restore the backup? EDIT: I just change the hosts file to include our server address with the client's domain name. I then created a cPanel account & installed WordPress. I went to the admin link for the site and still shows I cannot access it. Any help would be greatly appreciated, thank you!
    0
  • Anupam SG
    There are multiple ways to go about it. However, the most convenient(without compromising security aspect) is in both the scenarios you can install the SSL certificate directly from cPanel after moving the site to the server. Since you have not mentioned where your test sites are hosted, I'll assume it is on a cloud server, which is the more appropriate way to do it anyways. This is how I generally would do it, irrespective of whether a SSL exists or not: 1. Develop the site in the subfolder of the same directory of the live site[e.g. public_html/domain/testdirectory/ where public_html/domain is the location of the live domain]. If security is a concern, then use .htpasswd directive to secure the test folder. 2. Once development is complete, move the files to live directory and change wp-config, .htaccess entries accordingly. 3. In cPanel Add and install the SSL certificate. You can do this in Step 1 too, and access the HTTPS version of the test site itself at "domain dot com/testsite" subdirectory. These steps should be applicable to both the scenario irrespective of whether SSL already exists or not; and saves the complication of restoring backups with the advantage that you are developing on the live server itself, hence chances of mis-configuration with server OS and hardware are minimal as well.
    0
  • cPanelMichael
    Hello @zedsweb, The advice in the previous post is solid. One thing to keep in mind is that the free SSL certificates offered as part of the AutoSSL feature are only intended to work on the web server they are generated on. They expire every 90 days and must be renewed. You can read more about how this works at: SSL FAQ and Troubleshooting - Version 74 Documentation - cPanel Documentation Thank you.
    0

Please sign in to leave a comment.