Lunarpages Web Hosting Forum

Author Topic: MySQLi change for Wordpress  (Read 764 times)

Offline nexonr0

  • Newbie
  • *
  • Posts: 5
MySQLi change for Wordpress
« on: February 24, 2019, 02:05:36 AM »
Hello, first sorry for my English, congratulate them for their work, I am a client of Lunarpages for more than five years, my website is nexonr.com and this is with wordpress, now I have to update to PHP 7.0 and in doing so I also have to to update MYSQL to MYSQLI and I do not know what I should do, would you be so ambles to explain to me what I have to do ?,
thanks and best regards

<Edit title to consolidate two topics -- Mod.>
« Last Edit: February 24, 2019, 05:02:42 AM by MrPhil »

Offline Malin Cenusa

  • Junior System Administrator
  • Support
  • Spaceship Navigator
  • *****
  • Posts: 86
  • The World Is Not Enough
    • Solutions Straight from Tech Support
Re: MYSQLI
« Reply #1 on: February 24, 2019, 04:10:02 AM »
Hello,

A detailed article about how the migration from MySQL to MySQLi can be achieved is here: https://www.phpclasses.org/blog/package/9199/post/3-Smoothly-Migrate-your-PHP-Code-using-the-Old-MySQL-extension-to-MySQLi.html

Hope this helps,
Malin Cenusa

Junior System Administrator - Managed Shared Hosting Team

Offline nexonr0

  • Newbie
  • *
  • Posts: 5
Re: MYSQLI
« Reply #2 on: February 24, 2019, 04:24:47 AM »
ok thankyou, but what I need to know is that php files in my wordpress public_html directory I have to change to be updated from mysql to mysqli, thanks

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6429
Re: MySQLi change for Wordpress
« Reply #3 on: February 24, 2019, 05:00:38 AM »
I do not use Wordpress myself, but I would be very surprised if it's not simply a single change to a configuration file. You would not need to go diving into the code and make multiple changes. Every other PHP application I've seen just has one place "Database Library" in one configuration file that you set to "MySQL" or "MySQLi", or something similar to that. Go to the Wordpress discussion sites and see if they have instructions there.

Of course, if you are still running an ancient version of Wordpress, from before the time that MySQLi capability was added, you should upgrade to a current version of Wordpress rather than trying to patch such an old one. There will be a lot of security problems in old Wordpress installations.
« Last Edit: February 24, 2019, 05:04:31 AM by MrPhil »
Visit My Site

E-mail Me
-= From the ashes shall rise a sooty tern =-

Offline nexonr0

  • Newbie
  • *
  • Posts: 5
Re: MySQLi change for Wordpress
« Reply #4 on: February 24, 2019, 05:46:55 AM »
Hello, thanks for replying, I have the latest version of wordpress installed, version 5.1, the problem is that when updating wordpress MYSQL is not updated

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6429
Re: MySQLi change for Wordpress
« Reply #5 on: February 24, 2019, 07:55:41 AM »
I googled the subject, and it is stated that your version of Wordpress will automatically select MySQLi, provided you are at PHP 5.5 or higher. The only problem comes if you are using an old, poorly-written plug-in that is hard coded for MySQL. In that case, you will need to take it up on the Wordpress support forum and/or the plug-in author's discussion area.

I can't go any deeper than that, as I do not use Wordpress. Someone else familiar with that product will have to take it from there if you are still having problems.
Visit My Site

E-mail Me
-= From the ashes shall rise a sooty tern =-

Offline nexonr0

  • Newbie
  • *
  • Posts: 5
Re: MySQLi change for Wordpress
« Reply #6 on: February 25, 2019, 09:53:30 AM »
Hello, first sorry for my English, I think you're right, the new version of wordpress is ready to go from mysql to mysqli, the problem is that every time I tried in cpanel change from php 5.6 to php 7 (because I received a email from Lunarpages asking me to do it) they have blocked my account, the first time they told me that they had blocked my ip and they put me back to version 5.6 of php and when I try again it gives me the error 403 forbidden and they say that I had malware in my wordpress files, I have done everything that they have told me, they have answered me that it was already solved but I still can not get into my wordpress administrator and without being able to see my web, I have already sent them a new ticket, because can this happen? thanks for your help

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6429
Re: MySQLi change for Wordpress
« Reply #7 on: February 25, 2019, 11:58:58 AM »
I've seen accounts blocked by IP address because you made too many attempts to connect in too short of time, and the system assumes this is a denial of service (DoS) attack. If you are still blocked, you need to open a support ticket (by email if necessary) and get your IP address unblocked.

I have no idea why you can't change from PHP 5.6 to 7.1. Did you remember to select the domain(s) and press the "Apply" button after selecting the new version? If you have malware in your Wordpress installation, I'm surprised it would let you go back to PHP 5.6 after you tried to go to PHP 7.1. If you tried going to PHP 7.2, try 7.1 instead. 7.2 is much stricter about language conformance and may not work with your version of Wordpress. Maybe it's seeing PHP errors at 7.2, and assuming that there's malware.

If none of that works, you'll have to open another ticket and work with support to find what's wrong with your Wordpress installation. If it really does have malware in it (I don't know how you would test for it, or how they're testing it) you might have to erase all the files and copy in a fresh version of the files. Find out how to do this without wiping out your database (and back up your database first, just to be sure, and know how to restore it) -- it's probably not a normal "installation" of Wordpress, since that will probably clear out your database.

I hope you are familiar with Wordpress support forums (at wordpress.org), as you probably should be looking there for information (if you aren't already).
Visit My Site

E-mail Me
-= From the ashes shall rise a sooty tern =-

Offline nexonr0

  • Newbie
  • *
  • Posts: 5
Re: MySQLi change for Wordpress
« Reply #8 on: February 26, 2019, 06:42:35 AM »
thanks, my web already works. the malware has been removed and the problem 403 forbidden was permissions in a folder in wordpress which I do not know how they were changed, the cuaestion is that all problems occur when I change to php 7.0, if I do not change and I'm still in php 5.6 nothing happens and now I have panico to try again, thank you very much for your help