Make WordPress Core

Opened 8 years ago

Last modified 2 months ago

#5235 accepted enhancement

Add Pre-flight checks to install

Reported by: westi Owned by: pishmishy
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords: needs-patch
Focuses: Cc:

Description (last modified by westi)

It would be nice for the installer to do some pre-flight checks and warn the users of things that will stop WordPress working (either completely or partially)

Candidates for the pre-flight checks:

  • Functions which may be disabled - See #3014
  • Memory limit #5235

Attachments (3)

5235-functions.php.patch (1.7 KB) - added by pishmishy 8 years ago.
A rough draft
5235.2.patch (3.6 KB) - added by pishmishy 8 years ago.
Improved, extendable pre-flight checks
5235.patch (5.6 KB) - added by pishmishy 8 years ago.
Final draft of pre-flight checks

Download all attachments as: .zip

Change History (28)

#1 @westi
8 years ago

  • Description modified (diff)

#2 follow-up: @DD32
8 years ago

AFAIK WordPress still uses mail() by default unless a plugin is loaded to replace it.

One check which would be good is to check if mail() is disabled.

if( null === @mail('','','') )

false will be raised if mail() is available, as the email is incorrect.
null will be raised if mail() is disabled.

#3 @pishmishy
8 years ago

  • Owner changed from anonymous to pishmishy
  • Status changed from new to assigned

8 years ago

A rough draft

#4 @pishmishy
8 years ago

I've added a rough draft of a potential preflight check. I don't know if this is the sort of direction people would like to see it take, so I'd appreciate any feedback.

#5 @pishmishy
8 years ago

  • Keywords has-patch added; needs-patch removed

#6 @santosj
8 years ago

There should be more logic to make sure they have Allow_Fopen_URL or the PHP configuration to get URLs. That is important, but not required.

I was thinking about perhaps having levels (green, yellow, red) that the other installers have (OpenAds). Instead of displaying all of them, just display the yellow and halt on red (ask to continue with message saying "Hey, yo some parts of WordPress won't function correctly. Get bettre [intentionally misspelled] host."

Since I don't have any involvement, I would rather like anything that is done. The above just suggestion, if I had a chance to do something.

#7 in reply to: ↑ 2 @darkfate
8 years ago

@DD32: Yes, there should also be check for mail()

I don't think WP should recommend a different host, but do like what's in the patch already. There should obviously be a check again button so that a person who operates their own server can change it and just hit check again and have the next button turn into a link if everything is good to go.

#8 @pishmishy
8 years ago

I've taken some of the suggestions into consideration and I've attached a new patch. Checks can throw warnings or stop the installation completely if necessary. I've had to alter install.php too.

I've deliberately avoided adding new, more thorough checks for now and concentrated on the larger view.

#9 @pishmishy
8 years ago

I think I need to be doing this in a more 'pluggable' style - the current patch isn't easily extended with new checks.

8 years ago

Improved, extendable pre-flight checks

#10 @pishmishy
8 years ago

  • Keywords dev-feedback added

New draft of preflight check system - using hooks and functions to make it easily extensible. Note overloading of error code to distinguish between fatal problems and warnings.

To do:

  • Highlighting of errors using fade box
  • MySQL version check

I'd appreciate some feed back on this.

8 years ago

Final draft of pre-flight checks

#11 @pishmishy
8 years ago

I've added my final draft for the pre-flight checks. Someone could probably do a better interface and I'm sure there are more checks we can perform, but the ground work is here.

Feedback welcomed :-)

#12 @Denis-de-Bernardy
7 years ago

  • Component changed from General to Upgrade/Install

there are at least 2 other tickets related to similar things as I write.

#14 @Denis-de-Bernardy
6 years ago

  • Keywords needs-patch added; has-patch dev-feedback removed
  • Milestone changed from 2.9 to Future Release

#15 @dd32
6 years ago

see also #9474

#17 @hakre
6 years ago

cross-referenced: #11466

#18 @hakre
6 years ago

Nice patch. Worth to get more attention.

#19 @hakre
6 years ago

  • Keywords dev-feedback added

Close as wontfix because in the lack of interest by multiple devs? Plugin material (dd32?)

#20 @nacin
6 years ago

A health check has been discussed for 3.0 for some time. I imagine that will be a topic in this week's dev chat when planning out the 3.0 features.

#21 @dd32
6 years ago

Plugin material (dd32?)

This would be best in Core, Cant have a plugin run before WordPress is installed :)

#22 @chriscct7
14 months ago

The health check plugin this was supposed to be replaced with never got off the ground. Part of the problem is it didn't solve the issue of needing the error messages to show during install. I think someone from core should take a look at this. What could be done is if an error is detected then show page letting people know in the view after they select the language pack (so we can localize the error messages), unless the error involves something to do with downloading or showing those, in which case we'd need to do it before then.

#23 @ericlewis
11 months ago

Does anybody care? I sorta like the idea of letting users know that their hosting sucks or the weird decisions they've made about php configuration are gonna mess them up down the road. However, it goes against our philosophy of supporting the lowest common denominator of hardware / software configurations.

#24 @chriscct7
11 months ago

Supporting the lowest common denominator doesn't mean we support all hosting installs, just the lowest powered ones that are still common in theory. That being said, there will always be environments that are lower than the lowest common denominator. WordPress should have alerts for those who aren't compliant with the WordPress minimum standards as defined on https://wordpress.org/about/requirements/

#25 @chriscct7
2 months ago

  • Keywords dev-feedback removed
Note: See TracTickets for help on using tickets.