LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   WordPress Instances with Multiple Databases (https://www.linuxquestions.org/questions/linux-newbie-8/wordpress-instances-with-multiple-databases-4175698304/)

awaismalik 07-26-2021 02:57 AM

WordPress Instances with Multiple Databases
 
I am migrating the website from old server to new server for which i only have command line access to both servers. The website consists of two languages so i copied both wordpress files wordpressLanguage1 and wordpressLanguage2 files to the new server and also exported two mysql databases as exportLanguage1.sql and exportLanguage2.sql. On the new server i installed apache2, mysql,mariadb,php and configured them. In /etc/apache2/sites-available/mywebsite file at place of ServerName and ServerAlias i have placed IP of my new server to test the website. In database wp_options i also changed the siteurl and home to IP of my new server. When i search with IP of my new server it open the website of Language1 on the right side corner when i select the Language2 the IP redirects me to the old server URL. I am sure both databases are loaded and also both wordpress files are copied.Configuration at /etc/apache2/sites-available/mywebsite files are also same. For both languages website files(.conf) i have defined the same SeverName and ServerAlias 'IP' address of new server. Can any one tell me what i am missing or doing wrong? Thanks

TenTenths 07-26-2021 04:45 AM

Quote:

Originally Posted by awaismalik (Post 6269693)
In database wp_options i also changed the siteurl and home to IP of my new server.

Changing the domain name of a wordpress instance isn't as simple as that, as the domain name appears in a lot of places inside the database rather than just the options.

There are wordpress plugins for doing domain name changes, you'll probably need to use one of them.

awaismalik 07-26-2021 04:52 AM

Quote:

Originally Posted by TenTenths (Post 6269707)
Changing the domain name of a wordpress instance isn't as simple as that, as the domain name appears in a lot of places inside the database rather than just the options.

There are wordpress plugins for doing domain name changes, you'll probably need to use one of them.

Unfortunately i dont have access to wp-admin so i can not use plugins. I am doing the backened migration of wordpress site.

TenTenths 07-26-2021 05:00 AM

Quote:

Originally Posted by awaismalik (Post 6269708)
Unfortunately i dont have access to wp-admin so i can not use plugins. I am doing the backened migration of wordpress site.

I'd strongly suggest you get whoever does have admin access to grant it to you for the purposes of this migration, you'll find it difficult otherwise.

Or maybe take a look at https://torquemag.io/2017/04/switch-...-names-wp-cli/ and https://wp-cli.org/ (which a 30 second search on Google for "wordpress migrate to new domain command line" turned up.)

TB0ne 07-26-2021 08:04 AM

Quote:

Originally Posted by awaismalik (Post 6269708)
Unfortunately i dont have access to wp-admin so i can not use plugins. I am doing the backened migration of wordpress site.

Agreed with TenTenths, and will question why (as the administrator who is doing server-migrations), you are tasked with doing something you don't have rights to do??


All times are GMT -5. The time now is 05:18 PM.