Search code examples
phpwordpresscpanelstaging

Shared cPanel Hosting package doesn't provide a staging URL that can be used with WordPress sites


I would like to hear from WordPress website developers that have their sites hosted via a shared cPanel hosting package... and who used a staging URL before they went live with the site.

Do any cPanel hosting companies provide a proper staging url that can be used to finish the installation of WordPress on the server before the domain names are pointed to the server? And if so, what format is the staging URL?

Here is a detailed explanation of the problem I am having with my hosting company (only a problem for my WordPress sites):

My cPanel 'staging URL' includes my cPanel user-id as a sub-directory, as in this format: https://cpanelserver.com/~cpaneluserid/. This means that no WordPress site will be able to use this staging URL format - because WordPress interprets the /~cpaneluserid/ as a page name.

So when I use the staging url, instead of giving me the home page of the site as it should, WordPress takes me to a page called "~cpaneluserid", which is of course a page with no content.

And trying to navigate away from this invalid page (page that has no content) doesn't work, as this coding: <?php bloginfo( 'url' ); ?> will always return https://cpanelserver.com/~cpaneluserid/, so the new page link will give you this URL: https://cpanelserver.com/~cpaneluserid/newpage/, showing the 'newpage' as a sub-directory of this invalid page '~cpaneluserid'.

This also means I can't get into the Admin area to even finish off the WordPress install (eg: save Permalinks) - because to login the url would look like this: https://cpanelserver.com/~cpaneluserid/wp-admin/ - which is not the correct address for the admin area!

Nor can I show my client their website design, to get their approval, before they go live.

.

Has anyone else encountered this problem with their shared cPanel hosting company, and how did you solve it?

I would appreciate any suggestions that can help me with this issue.


Solution

  • I finally solved the problem.

    I had posted a similar question about this issue earlier - and that post contains the solution - as can be seen here: How to access the home page of WordPress from a cPanel staging URL.

    NOTE: This post actually states the problem better, and I would have prefered to have the solution associated with this post, but a WP moderator has deleted the answer from this post.