Error connecting to database
-
A friend of mine has a WordPress-based website (ficticious name: https://HISWEBSITE.com), hosted in a provider’s data center. Version of WordPress: v5.8. The website is fully functional, no problems at all.
He asked me to extend functionalities of his website (e.g. multilingual, etc.). In order not to impact (destroy) his current website while extending functionalities I tried to clone his website onto my URL (fictitious name https://MYWEBSITE.com). I have FULL control of the computer which runs MY website. Having also FULL administrative (WP-based) control over my friend’s website I took the following steps:
1. Backup of my friend’s website including a dump of his database.
2. Transferring all files to my computer.
3. I Installed WordPress v5.8 on my computer
4. I copied ALL files from the backup (step 1) into /var/www/html/myFriend
5. In MySQL I created a database (same name as on my friend’s website)
6. In MySQL I applied the untouched MySQL dump file (step 1) to the database just created.
7. In file wp-config.php I replaced
a) Name of database „rdbms.provider.com“ to „localhost“
8. I restarted the web server (Apache2): no problems
9. URLs
a) My friend’s website is invoked by „https://HISWEBSITE.com“
b) My website (with respect to the cloned stuff) has to be invoked by
„https://MYWEBSITE.com/myFriend“
10. When trying to access my friend’s cloned web contents from MY website (by entering „https://MYWEBSITE.com/myFriend“) the URL in Mozilla Firefox changes to
„https://HISWEBSITE.com/myFriend“, i.e. the components of the URL get intermixed.
Of course, this results in an error. Firefox access my friend’s website but cannot find subdirectory “myFriend”.Questions:
1. What do I wrong? Which other files have to be modified?
2. Where is the token „HISWEBSITE“ stored in the CLONED data on MY computer?
3. Are there other alternatives for cloning a functional WP-based website (NOT moving it!!). Please note: Cloning is done for experimental work). I also checked with Linux grep to locate occurrences of “HISWEBSITE“ but could not find them.
4. I searched the internet but I could not find a clear and sober tutorial for cloning / moving a WP-based website. Many tutorials seem to be superficial, not having been created in the context of a real need for cloning or in the context of a failure.Could you point me to a „good“ and exhaustive tutorial, please? You may also point me to a Linux script which does the job.
Thank you very much in advance.
Best regards
Dieter
The topic ‘Error connecting to database’ is closed to new replies.