Web lists-archives.com

Re: Wordpress wows ...

On Mon, 2019-03-25 at 10:49 +0000, Lester Caine wrote:
I think I was under the impression that wordpress made life easier as it 
keeps nannying you about keeping up to date. That is probably correct if 
you only use the core components, but the 'money making' extensions are 
probably used by 99% of people, the vast majority of whom are reliant on 
the sellers to maintain things?

Having just taken on another 20 domains all of which are live and have 
been 'maintained' so that there are no 'outstanding updates' one expects 
little trouble other than working out just which add-ons are actually 
being used on each site? Except the virtual hosting is too helpful, and 
has every version of PHP from 5.2 to 7.3 ... and some sites are still on 
5.5 while others are on different versions of 7. I did have a little 
panic as having upgraded one site from 5.5 to 7.2 - and fixed the 
remaining mysql calls in a couple of plug-ins so it didn't white screen 
- I went to check another site and found it on 7.2 as well ... turns out 
I'd simply picked one that had already been updated and now my crib 
sheet has the current versions of each site so I can now work through 
the ones that are still on a PHP5 version and fix them.

The problem is with wordpress keeping pushing 'autoupdate' even when 
it's identified the site is using plugins which have not yet been 
updated and in this particular case will not be provided with an update 
at all how does one maintain a stable environment. The hosting is 
managing things nicely but has dropped 'mysql' from the PHP7.x package 
list. Wordpress quite rightly still supports it in the core at the 
moment, so a scan always shows mysql_ function calls. I think I am safe 
simply using the existing MariaDB server as that is already on 7.2 
anyway but should I ensure wordpress autoupdate is off until I can clear 
the other problems? As yet I've not worked out where to find the error 
logs on the hosting, the 'Errors' link just gives a blank page and while 
the logs are being archived to a logs folder, there are no 'deprecated' 
messages in those logs so the only way currently to test is switch on 
error display and see them on the live site.

Anybody been here before and can suggest where I should be heading to 
sort out the sites ... short of simply dumping a copy on a local machine 
which is essentially what I did with the first one :( But since the 
primary domain was changing on it that was the recommended route anyway. 
I suppose I could take advantage of the hosting and simply create a demo 
site using each main site in turn ... at least it would be tested in the 
same environment!

WordPress is still using mysql_* calls? I might expect that of badly written plugins, not the WordPress core itself. If possible, try to find alternative plugins that don't use those methods, as they've been marked unsafe for years now, so it's little wonder they've been removed!

You might be able to write a set of wrapper methods to create custom functions that replace the removed ones (although this might only work in a namespace) that can call through to either the mysqli_* functions or something else like PDO.