Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to host wordpress database from other server

I've a problem is that I've to host wordpress database from other server and directory from another server where my domain links, so is it possible to connect wordpress directory from other database which is not on same server, kindly resolve my issue if know the answer. Thanks in advance.

like image 631
Muhammad Umer Shaikh Avatar asked Sep 19 '16 09:09

Muhammad Umer Shaikh


People also ask

Can we use different database for WordPress?

Within the Data Explorer you can switch database and edit any table in any other database to which you have access. So basically this feature is available, but… You cannot access tables in another database from the Data Designer, Data Projects, Data Menus and the Data Publisher (will be part of the next release).

Where can I host my DB?

The largest hosting providers are Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP), and there are many local and regional providers as well. You will want to consider which provider to use based on a variety of factors such as cost, location, and available services.


1 Answers

Yes, as long as the MySQL server allows the database to be accessed by external servers. When you set up WP, instead of "localhost", you'll put in the SQL server.

you can export the current database, then you will create a database on another server,

then instead of "localhost" (in the config.php ) you will put the IP address of the server and then the config.php will connect

// wp-config.php

define ( 'DB_NAME', 'yourdbname' );
define ( 'DB_USER', 'yourusername' );
define ( 'DB_PASSWORD', 'yourpassword' );
define ( 'DB_HOST', '111.222.0.1' ); // IP address of the server where MySQL is running 

// make sure MySQL server will listen to the request from your WP server IP !

https://forums.digitalpoint.com/threads/can-i-host-wordpress-database-in-an-other-server.2702115/

like image 141
R.K.Bhardwaj Avatar answered Oct 02 '22 01:10

R.K.Bhardwaj