Archive

Essential guidelines to Fix MySQL extension which is required by WordPress

Your PHP installation hence, all in all, appears to be lacking the MySQL extension error in WordPress. This is a complete frequent hassle if you are therefore putting up a WordPress CMS on a new and latest Linux VPS. The lacking the MySQL extension is much a regular hassle in view that the whole extension doesn’t come by default with so many different running systems. In this tutorial, we will be letting you know about how you can restore the trouble with the entire missing MySQL extension which is required by WordPress, as well as the whole WordPress installation successfully.

Missing an essential PHP extension is hence no longer something that you need to be concerned about. If you eventually visit the following message on your display as when attempting to access WordPress installation right through the internet browser, then you somehow one of the few major WordPress customers who are also dealing with a similar problem.

7 Essential Ways to Fix MYXQL Extension which is required by WordPress

  1. Connect SSH & Check the PHP Version

To fix up the issue, you should somehow have SSH access to the server. Connect it with your Linux VPS by SSH and yet check the PHP version which is currently being used:

  1. Use of Info.php File

You can even choose to check the PHP version by means of making a straightforward info.php right into your public_html directory. This is all done through the following context:

When you make the file, open your preferred internet browser and access the document.

  1. Update the necessary bundles

If in case you have been running an Ubuntu VPS and PHP 7, at that point run the following command:

  1. Restart the Web Server

At that point, restart your Apache service for the progressions to produce results, or in the event that you are using Nginx + PHP-FPM, at that point, restart the PHP-FPM service.

  1. Updating PHP

If in the condition that you are running the PHP 5, run the below-mentioned command:

You have to restart the suitable set of services for all the chances to take upon into effect.

  1. Searching available packages containing MySQL

PHP MySQL Extension

To look upon as through all the available packages that are containing PHP MySQL extension, you can somehow utilize this command:

Then once again, if you have been running a CentOS VPS and you have the PHP 7 installed right on your server, you have to use the below-mentioned command to deal with this issue:

  1. Restart Apache

Restart the Apache or even the PHP-FPM service inside the system, which you have been using upon as Nginx + PHP-FPM as being a web server.  In the event that you eventually have the PHP 5 installed on top of your CentOS server, you have to run the below-mentioned command:

Restart the necessary service for the sake of changes to take into the whole effect.   To search out for all the available packages that are containing MySQL, you can hence use the below-mentioned command:

Once you have all installed with the WordPress MySQL version extension for the PHP, you can easily make your way back to your whole WordPress setup. If the entire process of installation gets easy and smooth, the message related to the missing MySQL extension will not be presented in front of you.  You can, later on, continue yourself with the installation of your WordPress setup.

How can you easily fix the cPanel Server?

If you are on a cPanel server that you have root access to, you will need to enable and install the MySQL PHP module by the use of EasyApache four interfaces in your WHM. Here we have the step by step guide about it for your help:

Step 1: Log in to your WHM as root.

Step 2: Choose the option of “EasyApache 4”. You will see a web page as below:

search-for-easyapache-4-option-in-Cpanel

Step 3: You will see a highlighted field “Currently Installed Packages,” click on the ‘customize’ button as proven below:

customize-easyapache4-options

Step 4: Once there, choose ‘PHP Extensions,’ and in the search field kind MySQL, you will see the MySQL options, as considered below:

Search-for-PHP-MySQL-extension

Step 5: Select the required mysqlnd extension as per your requirement of the PHP versions. You can truly pick the entire model that is displayed, and this will cause no problems.

Step 6: Once you have chosen the MySQL extensions there click on “Review,” scroll down and click on “Provision” button, you will see the web page as below:

cpane-easyapache-4-review-page

easyapache-4-provision

Step 7: Once finished, click on the done option and check your WordPress set up and the error should be gone.

Step by Step Guide to easily fix Shared Hosting

If you have eventually set up WordPress on top of the shared web hosting account, this error is yet most in all likelihood is being prompted through the use of MySQL extension being disabled on your own web hosting account. In order to permit it, you have to follow the below-mentioned steps.

Step 1: You have to sign in with the cPanel account.

Step 2: Search for the option of “Select PHP Version” & then just click on it.

Step 3: Once there, trade the PHP model to Current from the dropdown as mentioned below:

change-PHP-version-to-native

Step 4: Once you have chosen the PHP version as current, tick on the alternative that says “mysqli” and/or “mysqlnd” from the choices introduced and clicks on save.cpanel-enable-PHP-MySQL-extensionStep 5: Check your WordPress set up and the error should be gone.

Step by step Guideline to fix on a CentOS Server

If you are somehow running your WordPress website on top of the CentOS VPS besides using any type of accessing the control panel, your first step needs to be all about to check the PHP model which you have been running.

# Hypertext Preprocessor -v

I Will display you the PHP Version you are presently running. In our case, this is PHP 7.0. We want to set up the PHP-MySQL extension for PHP 7.0. We can do this by the use of the following command:

# yum update

# yum set up php70w-MySQL

Once installed, restart your internet server, for Apache, it is:

systemctl restart httpd

Or

service httpd restart

After restarting, your WordPress website has to work correctly.

Important Guidelines to Repair on an Ubuntu Server

If you are running your WordPress website online on an Ubuntu VPS except for any sort of control panel, your first step would be to take a look at the PHP version that you are running as mentioned below:

# personal home page -v

PHP-MySQL extension for Php 7.0

I Will display you the PHP Version you are presently running. In our case, this is PHP 7.0. We want to installation the PHP-MySQL extension for Php 7.0. We can do this the use of the following command:

apt-get update

apt-get set up php7.0-mysql

Once installed, restart your internet server, for Apache, it is:

service httpd restart

After restarting, your WordPress web page must work properly.

Conclusion:

I hope this information will help you to get to the bottom of the trouble with your WordPress site! We have presented for you a complete guide of different methods to fix the mysql extension, which is required by WordPress. Follow all the significant steps carefully one by one!

See More

Create Virtual Environment Python 3

Redirect HTTP To HTTPS htaccess WordPress

The website owners need to know about the redirect of HTTP to HTTPS to improve the security feature of the website. Usually, a domain does not include the SSL certificate when initially purchased from the domain provider.

SSL certificate is essential to create a security layer around the domain, especially for eCommerce websites, to protect the payment information of online buyers.

WordPress is a convenient website builder widely used for developing websites. More than 25% of the site on the internet is developed with WordPress.

Along with the convenience in website building, there is a massive risk of hackers’ attack, especially on websites designed with WordPress. Therefore, it is necessary to use various safety measures on WordPress websites like SSL certificates.

What is HTTP?

HTTP is an abbreviation of (Hypertext Transfer Protocol) that is used to transfer the data and files in various formats on the World Wide Web (www). Usually, the URL of any website starts that starts with HTTP is marked as “not secure” in the domain bar.

It happens because it allows transferring any type of data without encryption, and it is easy for hackers to get access to data easily.

What are HTTPS and SSL?

HTTPS is an abbreviation of Hypertext Transfer Protocol Secured. It works in the same pattern just like HTTP, but it encrypts the data during communication between the client and the server.

It helps to enhance the security of the website. It is beneficial to keeps the hackers away from the site because it is secured with an SSL certificate.

The addition of “S” in HTTP represents the SSL (Secure Sockets Layer) certificate that is installed on the domain. It is used for data encryption purposes.

How to Force https WordPress?

Users can activate the SSL certificate manually or can use a WordPress plugin for this purpose. But we recommend using a plugin if you are a beginner to avoid any type of problem.

Keep in mind; don’t forget to take the backup of the database. It is beneficial to restore the settings in case of any problem.

Force HTTPS in WordPress by Using Plugin

It is the easiest way to redirect all traffic to https in WordPress. Different plugins are available for this purpose, but in this article, we are going to use “really simple SSL plugin.” This plugin is recommended and widely used by websites.

Follow the below mentioned simple steps to download and install the plugin:

Step # 1

Go to the dashboard of WordPress

301 redirect http to https htaccess

Step # 2

Go to plugins options in the right menu bar

redirect all traffic to https

Step # 3

Select add new plugin

htaccess force https and www

Step # 4

Search and install a really simple SSL plugin.

really simple SSL plugin for wordpress

Step # 5

Activate your plugin

activate really simple ssl plugin

After installing and activating the plugin click “Go Ahead, Activate SSL”, It automatically detects the SSL certificate and redirects your website to HTTPS.

how to force https wordpress

The most attractive part of using a plugin is that it automatically detects and fixes the HTTP errors in the content.

However, some drawbacks are also present for using the plugin. Plugins use a buffering technique to fix the content errors that can harm the performance of the website. But this impact can be reduced up to a certain level by using a caching plugin.

Keep in mind; you have to make sure that the plugin remains to activate all the time. Otherwise, your site will face mixed content errors.

Force HTTPS in WordPress Manually

This method is somehow tricky, but it is permanent, and the best solution for 301 redirect HTTP to https htaccess. But this method requires little knowledge about coding. If you don’t know about coding, then don’t worry, we will provide you codes and tell you how to implement it.

At first, you have to go on the settings option in the WordPress dashboard. Under the general settings, change the site URL in the fields and replace HTTP with HTTPS. After changing the protocol, save the settings, it will result in log out and asks you to login again.

At the next step, you have to add the following code in the .htaccess file of WordPress to redirect the site URL from HTTP to HTTPS.

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

</IfModule>

Nigix servers are getting popular nowadays due to efficiency in speed. If your hosting is on ARZ Host nigix servers, then add the following code.

server {

listen 80;

server_name example.com www.example.com;

return 301 https://example.com$request_uri;

}

Redirect http to https htaccess

After successful implementation of the above coding in the .htaccess file, your entire site works by using HTPPS without displaying any type of error. But if you want to force HTTPS and SSL on the admin area and login pages, then you have to configure the wp-config.php file for SSL.

For this purpose, add the following code in the wp-config.php file just above the “That’s all, stop editing!”.

define(‘FORCE_SSL_ADMIN’, true);

After completion of the process mentioned above, the SSL certificate is integrated completely in the website. But still, the website encounters the errors of mixed content.

Old HTTP Protocol

It could be due to different sources like images, style sheets, scripts, etc. because these are loading uses the old HTTP protocol. In this case, the browser doesn’t show a secured connection icon in the address bar.

However, the latest versions of browsers automatically detect and block the unsecured scripts and resources. These browsers show a secured connection icon in the address bar but with a notification.

Users can use the inspect tool to find out the mixed content errors and remove them from the website for better performance.

Conclusion

SSL certificate is vital to make your site secure and safe. But sometimes website owners don’t know the entire process, and as a result, they encounter different problems.

In the above article, we discuss the entire process simply and easily. You can do it either manually or by using the plugin by following the steps mentioned above.

70%OFF

Lockdown Sale

Hurry Up! Offer ends in
days 01 02 hrs 21 22 mins 58 59 secs 47 48
Buy Now