{"id":27497,"date":"2018-07-18T04:18:46","date_gmt":"2018-07-18T09:18:46","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=27497"},"modified":"2022-06-03T03:34:48","modified_gmt":"2022-06-03T08:34:48","slug":"how-to-configure-wordpress-to-use-a-remote-database","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-wordpress-to-use-a-remote-database\/","title":{"rendered":"How to Configure WordPress to use a Remote Database"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p><img decoding=\"async\" class=\"alignnone size-full wp-image-27565\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/07\/How-to-Configure-WordPress-to-use-a-Remote-Database.jpg\" alt=\"How to Configure WordPress to use a Remote Database\" width=\"742\" height=\"371\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/07\/How-to-Configure-WordPress-to-use-a-Remote-Database.jpg 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/07\/How-to-Configure-WordPress-to-use-a-Remote-Database-150x75.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/07\/How-to-Configure-WordPress-to-use-a-Remote-Database-300x150.jpg 300w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/p>\n<p>WordPress is the most popular content management system (CMS) based on PHP and MySQL. When your WordPress CMS grows in traffic and you have outgrown your current server resources, a professional solution is to host your database on a separate database server. With this solution, you can optimize your database and your web server independently and both servers can grown on it&#8217;s own machine. In this tutorial we will guide you on how to configure WordPress to use a remote database, on a <a href=\"https:\/\/www.rosehosting.com\/centos-hosting.html\">CentOS 7 based VPS.<\/a><\/p>\n<p><!--more--><\/p>\n<h3><strong>Requirements<\/strong><\/h3>\n<p>In order to run WordPress on your CentOS 7 VPS and configure it to use a remote database, we need the following requirements pre-installed:<\/p>\n<ul>\n<li>A Web VPS on which we will install the WordPress instance.<\/li>\n<li>A Database VPS with MariaDB or MySQL installed on it. The database will be hosted on this VPS.<\/li>\n<\/ul>\n<p>WordPress requires the following:<\/p>\n<ul>\n<li>Web server: Apache, Nginx<\/li>\n<li>PHP version 7.2 or newer, with JSON support, mbstring, zip and GD2 extensions.<\/li>\n<li>MariaDB version 10.0 or greater or MySQL database server version 5.6 or newer<\/li>\n<\/ul>\n<h3><strong>Step 1: Log in via SSH on both servers:<br \/>\n<\/strong><\/h3>\n<p>Log in to each VPS via SSH as user root<\/p>\n<pre>ssh roo@IP_Address -p Port_number<\/pre>\n<h3><strong>Step 2: Update all packages<\/strong><\/h3>\n<p>Once you are logged, run the following command on both servers to make sure that all installed RPM packages are up to date<\/p>\n<pre>yum -y update<\/pre>\n<h3><strong>Step 3: Install MariaDB server <\/strong><strong>on the Database VPS<\/strong><strong><br \/>\n<\/strong><\/h3>\n<pre>yum -y mariadb mariadb-server<\/pre>\n<h3><strong>Step 4: Install LAMP stack on a Web VPS<br \/>\n<\/strong><\/h3>\n<p>As mentioned in the requirements section of the tutorial, a LAMP stack (Apache, MySQL\/MariaDB and PHP) is required to run WordPress on the server. We will start with installing the Apache web server:<\/p>\n<pre>yum -y install httpd<\/pre>\n<p>After the Apache installation is complete, start the web server and enable it to start upon server boot:<\/p>\n<pre>systemctl enable httpd<\/pre>\n<p>PHP 5.4 is installed on CentOS 7 by default.<\/p>\n<p>In order to install and use PHP 7.2, we need to install EPEL and REMI\u00a0repositories:<\/p>\n<pre>yum install epel-release\r\n\r\nrpm -Uvh http:\/\/rpms.remirepo.net\/enterprise\/remi-release-7.rpm\r\n\r\nyum install yum-utils\r\n\r\nyum-config-manager --enable remi-php72\r\n\r\nyum update<\/pre>\n<p>Next, install PHP 7.2 along with the required PHP extensions:<\/p>\n<pre>yum -y install php php-cli php-mbstring php-gd php-mysqlnd php<code>-xmlrpc\u00a0php-xml\u00a0php-zip\u00a0php-curl<\/code><\/pre>\n<p>And finally, complete the LAMP installation by installing MariaDB client package:<\/p>\n<pre>yum -y install mariadb mariadb-server<\/pre>\n<p>Start the service and set it to start on reboot<\/p>\n<pre>systemctl start mariadb\r\nsystemctl enable mariadb<\/pre>\n<p>To accept remote connections, edit the MariaDB configuration file (\/etc\/my.cnf.d\/server.cnf) and change the following line:<\/p>\n<pre>bind-address = 127.0.0.1<\/pre>\n<p>with:<\/p>\n<pre>bind-address = web_server_IP_address<\/pre>\n<p>Do not forget to replace &#8216;web_server_IP_address&#8217; with the public IP of the web server.<\/p>\n<p>If you want to configure MariaDB to listen on all interfaces on the web VPS, set:<\/p>\n<pre>bind-address =\u00a00.0.0.0<\/pre>\n<p>Restart MariaDB for the changes to take effect:<\/p>\n<pre>systemctl restart mariadb.service<\/pre>\n<h3>Step 5: Create a MariaDB database for WordPress on the Database VPS<\/h3>\n<p>Log in to MariaDB console with the root user account:<\/p>\n<pre># mysql -u root -p<\/pre>\n<p>Create a new MariaDB database for WordPress using the following query:<\/p>\n<pre>mysql&gt; CREATE DATABASE wpdb;<\/pre>\n<p>Create a new MariaDB user for WordPress using the following query:<\/p>\n<pre>mysql&gt; CREATE USER 'wpuser'@'localhost';\r\nmysql&gt; CREATE USER 'wpuser'@'database_VPS_IP';<\/pre>\n<p>Then execute the following query to add a separate user for WordPress that will interact with the MariaDB database:<\/p>\n<pre>mysql&gt; GRANT ALL PRIVILEGES ON wpdb.* to 'wpuser'@'localhost' IDENTIFIED BY '5tr0ng_Pa55w0rd';\r\nmysql&gt; GRANT ALL PRIVILEGES ON wpdb.* to 'wpuser'@'database_VPS_IP' IDENTIFIED BY '5tr0ng_Pa55w0rd';<\/pre>\n<p>Do not forget to replace database_VPS_IP with the actual IP address of the database VPS .<\/p>\n<p>Execute the following command to apply the privileges we set:<\/p>\n<pre>mysql&gt; FLUSH PRIVILEGES;<\/pre>\n<p>Now we can exit the MariaDB session:<\/p>\n<pre>mysql&gt; quit<\/pre>\n<h3>Step 6: Configure the MariaDB server on database VPS to listen on public IP (or all interfaces)<\/h3>\n<p>Edit the MariaDB configuration file (\/etc\/my.cnf.d\/server.cnf) and change the following line:<\/p>\n<pre>bind-address = 127.0.0.1<\/pre>\n<p>with:<\/p>\n<pre>bind-address = database_server_IP_address<\/pre>\n<p>Or, configure MariaDB to listen on all interfaces on the database VPS:<\/p>\n<pre>bind-address =\u00a00.0.0.0<\/pre>\n<p>Restart MariaDB for the changes to take effect:<\/p>\n<pre>systemctl restart mariadb.service<\/pre>\n<h3><strong>Step 7: Install WordPress on the Web VPS<br \/>\n<\/strong><\/h3>\n<p>Download the latest WordPress version available at\u00a0https:\/\/wordpress.org\/download\/ and extract it in a directory on your server:<\/p>\n<pre>wget\u00a0https:\/\/wordpress.org\/latest.zip\r\n\r\nunzip -d\u00a0\/var\/www\/html\/ latest.zip<\/pre>\n<p>Set proper permissions on WordPress files and directories:<\/p>\n<pre>chown apache:apache -R \/var\/www\/html\/wordpress\/<\/pre>\n<p>Rename wp-config-sample.php WordPress configuration file to wp-config.php:<\/p>\n<pre>mv \/var\/www\/html\/wordpress\/wp-config-sample.php \/var\/www\/html\/wordpress\/wp-config.php<\/pre>\n<p>Edit the wp-config.php file and modify the following lines<\/p>\n<pre>vi\u00a0\/var\/www\/html\/wordpress\/wp-config.php<\/pre>\n<pre>\/** The name of the database for WordPress *\/\r\ndefine('DB_NAME', 'wpdb');\r\n\r\n\/** MySQL database username *\/\r\ndefine('DB_USER', 'wpuser');\r\n\r\n\/** MySQL database password *\/\r\ndefine('DB_PASSWORD', '5tr0ng_Pa55w0rd');\r\n\r\n\/** MySQL hostname *\/\r\ndefine('DB_HOST', 'database_VPS_IP');<\/pre>\n<h3>Step 8: Configure Apache to serve WordPress<\/h3>\n<p>Now we will have to setup the Apache configuration so it can serve the WordPress directory. Add the contents below in the \/etc\/httpd\/conf.d\/wordpress.conf file using vi or your favorite editor:<\/p>\n<pre># vi \/etc\/httpd\/conf.d\/wordpress.conf<\/pre>\n<p>Add the following lines:<\/p>\n<p>&lt;VirtualHost *:80&gt;<br \/>\nServerAdmin admin@your-domain.com<br \/>\nDocumentRoot \/var\/www\/html\/wordpress<br \/>\nServerName your-domain.com<br \/>\nServerAlias www.your-domain.com<\/p>\n<p>Alias \/matomo &#8220;\/var\/www\/html\/wordpress\/&#8221;<br \/>\n&lt;Directory \/var\/www\/html\/wordpress\/&gt;<br \/>\nOptions +FollowSymlinks<br \/>\nAllowOverride All<\/p>\n<p>&lt;\/Directory&gt;<\/p>\n<p>ErrorLog \/var\/log\/httpd\/wordpress-error_log<br \/>\nCustomLog \/var\/log\/httpd\/wordpress-access_log common<br \/>\n&lt;\/VirtualHost&gt;<\/p>\n<p>Save the changes and restart Apache for the changes to take effect:<\/p>\n<pre>systemctl restart httpd<\/pre>\n<p>Open http:\/\/your-domain.com in your favorite web browser and finish the WordPress installation.<\/p>\n<p>Congratulations. You have successfully configured WordPress to use a remote database on\u00a0a <a title=\"Ubuntu VPS Hosting\" href=\"https:\/\/www.rosehosting.com\/centos-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">CentOS 7<\/a> server.<\/p>\n<hr \/>\n<p>Of course you don\u2019t have to configure WordPress to use a remote database on CentOS 7, if you use one of our <a href=\"https:\/\/www.rosehosting.com\/centos-hosting.html\">Managed CentOS VPS Hosting Solutions<\/a>, in which case you can simply ask our expert Linux admins to set up your WordPress to use a remotely hosted database for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n<p><span style=\"color: #ff0000;\"><strong>PS<\/strong><\/span>. If you liked this post on how to configure WordPress to use a remote database on a CentOS 7 server,\u00a0 please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress is the most popular content management system (CMS) based on PHP and MySQL. When your WordPress CMS grows in &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Configure WordPress to use a Remote Database\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-configure-wordpress-to-use-a-remote-database\/#more-27497\" aria-label=\"Read more about How to Configure WordPress to use a Remote Database\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":27565,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1699,1710,1702,1701],"tags":[541,1732,148],"class_list":["post-27497","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-cms-crm-erp","category-databases","category-networking-and-domains","tag-centos-7","tag-remote-database","tag-wordpress","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Configure WordPress to use a Remote Database | RoseHosting<\/title>\n<meta name=\"description\" content=\"How to Configure WordPress to use a Remote Database | RoseHosting\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-configure-wordpress-to-use-a-remote-database\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Configure WordPress to use a Remote Database\" \/>\n<meta property=\"og:description\" content=\"How to Configure WordPress to use a Remote Database | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-configure-wordpress-to-use-a-remote-database\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-18T09:18:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-03T08:34:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/07\/How-to-Configure-WordPress-to-use-a-Remote-Database.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"371\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-wordpress-to-use-a-remote-database\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-wordpress-to-use-a-remote-database\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to Configure WordPress to use a Remote Database\",\"datePublished\":\"2018-07-18T09:18:46+00:00\",\"dateModified\":\"2022-06-03T08:34:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-wordpress-to-use-a-remote-database\\\/\"},\"wordCount\":856,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-wordpress-to-use-a-remote-database\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/How-to-Configure-WordPress-to-use-a-Remote-Database.jpg\",\"keywords\":[\"centos 7\",\"remote database\",\"wordpress\"],\"articleSection\":[\"CentOS\",\"CMS, CRM, ERP\",\"Databases\",\"Networking and Domains\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-wordpress-to-use-a-remote-database\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-wordpress-to-use-a-remote-database\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-wordpress-to-use-a-remote-database\\\/\",\"name\":\"How to Configure WordPress to use a Remote Database | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-wordpress-to-use-a-remote-database\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-wordpress-to-use-a-remote-database\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/How-to-Configure-WordPress-to-use-a-Remote-Database.jpg\",\"datePublished\":\"2018-07-18T09:18:46+00:00\",\"dateModified\":\"2022-06-03T08:34:48+00:00\",\"description\":\"How to Configure WordPress to use a Remote Database | RoseHosting\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-wordpress-to-use-a-remote-database\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-wordpress-to-use-a-remote-database\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-wordpress-to-use-a-remote-database\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/How-to-Configure-WordPress-to-use-a-Remote-Database.jpg\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/How-to-Configure-WordPress-to-use-a-Remote-Database.jpg\",\"width\":742,\"height\":371,\"caption\":\"How to Configure WordPress to use a Remote Database\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-wordpress-to-use-a-remote-database\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Configure WordPress to use a Remote Database\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Configure WordPress to use a Remote Database | RoseHosting","description":"How to Configure WordPress to use a Remote Database | RoseHosting","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-wordpress-to-use-a-remote-database\/","og_locale":"en_US","og_type":"article","og_title":"How to Configure WordPress to use a Remote Database","og_description":"How to Configure WordPress to use a Remote Database | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-wordpress-to-use-a-remote-database\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2018-07-18T09:18:46+00:00","article_modified_time":"2022-06-03T08:34:48+00:00","og_image":[{"width":742,"height":371,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/07\/How-to-Configure-WordPress-to-use-a-Remote-Database.jpg","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-wordpress-to-use-a-remote-database\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-wordpress-to-use-a-remote-database\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to Configure WordPress to use a Remote Database","datePublished":"2018-07-18T09:18:46+00:00","dateModified":"2022-06-03T08:34:48+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-wordpress-to-use-a-remote-database\/"},"wordCount":856,"commentCount":0,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-wordpress-to-use-a-remote-database\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/07\/How-to-Configure-WordPress-to-use-a-Remote-Database.jpg","keywords":["centos 7","remote database","wordpress"],"articleSection":["CentOS","CMS, CRM, ERP","Databases","Networking and Domains"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-configure-wordpress-to-use-a-remote-database\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-wordpress-to-use-a-remote-database\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-wordpress-to-use-a-remote-database\/","name":"How to Configure WordPress to use a Remote Database | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-wordpress-to-use-a-remote-database\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-wordpress-to-use-a-remote-database\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/07\/How-to-Configure-WordPress-to-use-a-Remote-Database.jpg","datePublished":"2018-07-18T09:18:46+00:00","dateModified":"2022-06-03T08:34:48+00:00","description":"How to Configure WordPress to use a Remote Database | RoseHosting","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-wordpress-to-use-a-remote-database\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-configure-wordpress-to-use-a-remote-database\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-wordpress-to-use-a-remote-database\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/07\/How-to-Configure-WordPress-to-use-a-Remote-Database.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/07\/How-to-Configure-WordPress-to-use-a-Remote-Database.jpg","width":742,"height":371,"caption":"How to Configure WordPress to use a Remote Database"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-wordpress-to-use-a-remote-database\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Configure WordPress to use a Remote Database"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/27497","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=27497"}],"version-history":[{"count":1,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/27497\/revisions"}],"predecessor-version":[{"id":41783,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/27497\/revisions\/41783"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/27565"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=27497"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=27497"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=27497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}