WordPress started as an Open-Source Content Management System (CMS), that was written in PHP supplemented with a MariaDB or MySQL database. It was developed as a blog-publishing system but it evolved to support other types of web content like forums, traditional mailing lists, and online stores, to name a few.

MariaDB on the other hand is a commercially supported fork of MySQL Relational Database Management System. It started as an Open-Source community-developed software.

When you integrate WordPress MariaDB, you get to optimize your WordPress experience; from enhanced performance and scalability to robust data management.

This article covers the different steps involved in setting up a WordPress MariaDB Integration in detail. It first covers the basics of the two tools namely their key features before diving into the integration setup.  

Solve your data replication problems with Hevo’s reliable, no-code, automated pipelines with 150+ connectors.
Get your free trial right away!
Simplify your Data Analysis with Hevo’s No-code Data Pipeline

A fully managed No-code Data Pipeline platform like Hevo helps you integrate data from 150+ data sources (including 50+ Free Sources) to MariaDB in real-time in an effortless manner.

Hevo with its minimal learning curve can be set up in just a few minutes allowing the users to load data without compromising performance. Its strong integration with umpteenth sources allows users to bring in data of different kinds in a smooth fashion without having to code a single line. 

Check out some of the cool features of Hevo:

  • Completely Automated: The Hevo platform can be set up in just a few minutes and requires minimal maintenance.
  • Real-Time Data Transfer: Hevo provides real-time data migration so that you can have analysis-ready data always.
  • 100% Complete & Accurate Data Transfer: Hevo’s robust infrastructure ensures reliable data transfer with zero data loss.
  • Scalable Infrastructure: Hevo has in-built integrations for 150+ sources that can help you scale your data infrastructure as required.
  • 24/7 Live Support: The Hevo team is available round the clock to extend exceptional support to you through chat, email, and support calls.
  • Schema Management: Hevo takes away the tedious task of schema management & automatically detects the schema of incoming data and maps it to the destination schema.
  • Live Monitoring: Hevo allows you to monitor the data flow so you can check where your data is at a particular point in time.

You can try Hevo for free by signing up for a 14-day free trial.

Steps to Set Up the WordPress MariaDB Integration

WordPress started with MySQL as its backend, but since MariaDB was developed as a drop-in replacement of MySQL, MySQL can be replaced with MariaDB as the backend for WordPress. This takes advantage of MariaDB’s better performance in addition to new features like new and improved database engines. Here are the steps you can follow to set up WordPress MariaDB Integration:

WordPress MariaDB Integration: Establishing an SSH Connection

  • To kickstart the process, you can start by migrating your existing MySQL database systems to MariaDB. 
  • Establish an SSH connection to your server first, and then stop the MySQL service with the following command:
/etc/init.d/mysqld stop
  • You should see the confirmation as Stopping mysqld: [ OK ].
  • Before migrating, make sure that you backup your databases. For Linux, you can use the following commands:
cp /var/lib/mysql/ backup/ -r cp /etc/my.cnf backup/

WordPress MariaDB Integration: MySQL Service Removal

  • After backing up your essential database operations, the next step is the removal of MySQL service from your server. First, get a list of all the installed MySQL packages as follows:
rpm -qa | grep mysql
mysql-5.1.69-1.el6_4.i686
mysql-devel-5.1.69-1.el6_4.i686
mysql-libs-5.1.69-1.el6_4.i686
mysql-server-5.1.69-1.el6_4.i686
php-mysql-5.3.3-23.el6_4.i686
  • Uninstall the MySQL client and server, the development tools, the libraries by executing the following command yum remove mysql mysql-server mysql-devel mysql-libs 
  • To wrap up this step, verify your distribution and Kernel versions as follows:
cat /etc/redhat-release
CentOS release 6.4 (Final)
uname -a
Linux test.server 2.6.32-358.23.2.el6.i686 #1 SMP Wed Oct 16 17:21:31 UTC 2013 i686 i686 i386 GNU/Linux

WordPress MariaDB Integration: Repository File Generation

  • The next step in the process is to generate the correct MariaDB repository file and store it under the /etc/yum.repos.d/ folder, based on the information from the commands report as follows:
[root@test yum.repos.d]# cat MariaDB.repo
# MariaDB 5.5 CentOS repository list - created 2014-06-01 14:13 UTC
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5/centos6-x86
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

WordPress MariaDB Integration: MariaDB Installation

  • In the installation of the repository file, as shown above, the URL of the GPG key is included. This is needed to verify the integrity of the package downloaded. The next step in this process is MariaDB installation. You can carry this out as follows:
yum clean all
yum install MariaDB-server MariaDB-client

WordPress MariaDB Integration: MariaDB Version Verification

  • Yum retrieves and imports the GPG (GNU Privacy Guard) key in the MariaDB installation process. It installs the MariaDB-compat and MariaDB-common dependencies along with the MariaDB server and client applications. Next, you need to start the MariaDB service and verify the version as follows:
/etc/init.d/mysql start
Starting MySQL... SUCCESS!
mysql
Welcome to the MariaDB monitor.  Commands end with ; or g.
Your MariaDB connection id is 2
Server version: 5.5.37-MariaDB MariaDB Server
Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
MariaDB [(none)]> SHOW VARIABLES LIKE "%version%";
+-------------------------+---------------------+
| Variable_name           | Value               |
+-------------------------+---------------------+
| innodb_version          | 5.5.37-MariaDB-34.0 |
| protocol_version        | 10                  |
| slave_type_conversions  |                     |
| version                 | 5.5.37-MariaDB      |
| version_comment         | MariaDB Server      |
| version_compile_machine | i686                |
| version_compile_os      | Linux               |
+-------------------------+---------------------+
7 rows in set (0.01 sec)

WordPress MariaDB Integration: Verification of WordPress Imports

  • This step would conclude the WordPress MariaDB Integration. To verify if your WordPress database is correctly imported, you can run a few simple MySQL queries for verification as follows:
mysql
MariaDB [(none)]> use wp1;
MariaDB [wp1]> explain wp_options;
+--------------+---------------------+------+-----+---------+----------------+
| Field        | Type                | Null | Key | Default | Extra          |
+--------------+---------------------+------+-----+---------+----------------+
| option_id    | bigint(20) unsigned | NO   | PRI | NULL    | auto_increment |
| option_name  | varchar(64)         | NO   | UNI |         |                |
| option_value | longtext            | NO   |     | NULL    |                |
| autoload     | varchar(20)         | NO   |     | yes     |                |
+--------------+---------------------+------+-----+---------+----------------+
4 rows in set (0.01 sec)
MariaDB [wp1]> select * from wp_options where option_name like "%home%";
+-----------+-------------+-----------------------+----------+
| option_id | option_name | option_value          | autoload |
+-----------+-------------+-----------------------+----------+
|        36 | home        | http://testdomain.com/| yes      |
+-----------+-------------+-----------------------+----------+
1 row in set (0.01 sec)

The functionality of the WordPress websites can be confirmed by loading them on a web browser as well.

Conclusion

This article talks about the steps you can follow to set up the WordPress MariaDB Integration in 6 simple steps. It also covers a brief overview of the features of the two tools before getting down to brass tacks. 

Extracting complex data from a diverse set of data sources to carry out an insightful analysis can be a challenging task and this is where Hevo saves the day!

Hevo offers a faster way to move data from 150+ data sources like databases or SaaS applications into your Data Warehouse/Database such as MariaDB to be visualized in a BI tool. Hevo is fully automated and hence does not require you to code.

You can try Hevo for free by signing up for a 14-day free trial. You can also have a look at the unbeatable pricing that will help you choose the right plan for your business needs.

Share your experiences of connecting WordPress MariaDB in the comment section below!

mm
Content Marketing Manager, Hevo Data

Amit is a Content Marketing Manager at Hevo Data. He enjoys writing about SaaS products and modern data platforms, having authored over 200 articles on these subjects.

No-code Data Pipeline For MariaDB