Accessing database with subdomain?

henrice

Registered
Feb 1, 2022
2
0
1
Toronto
cPanel Access Level
Root Administrator
Hi all,
I've come across an issue.

The site ABCD.com was built a long time ago, however, cPanel and Drupal are installed at hosting 123.123.123.123.
Now, this ABCD.com domain is already connected to a new site on a new hosting built with WordPress.

However, I would like to access this old site's database to retrieve some contents via Drupal View.
The old hosting and the cPanel are still working, I have the cPanel credentials and Drupal credentials.

Without pointing ABCD.com back to the old hosting 123.123.123.123, is there any way to access the old database via Drupal View to retrieve the contents? E.g. would a subdomain works?
What is the best solution?

Thanks a lot in advance for your help.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
14,235
2,217
363
cPanel Access Level
Root Administrator
Hey there! I'm not 100% certain on this one since cPanel doesn't typically work with Drupal. If you can configure a view in Drupal to connect to the old machine, it might work if remote connections are open.

You could definitely connect to cPanel and PHPMyAdmin on the old system without changing any DNS settings, but you'd have to look at the Drupal documentation to see if that is something that is supported. A quick search of the guide at SQL Views did not show any details on connecting remotely.

If mod_userdir is working in the old hosting environment you may be able to visit the original Drupal installation using the IP/~username method of accessing the site.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
14,235
2,217
363
cPanel Access Level
Root Administrator
I was hoping it would be that easy, but they could have things running that conflict with mod_userdir, as that is a common server configuration.

Maybe you could ask that host if they can enable mod_userdir for your domain? I still think that would be the easiest way to get access to the data.