Make WordPress Core

Opened 17 years ago

Closed 3 years ago

#5235 closed enhancement (worksforme)

Add Pre-flight checks to install

Reported by: westi's profile westi Owned by: pishmishy's profile pishmishy
Milestone: Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords:
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 17 years ago.
A rough draft
5235.2.patch (3.6 KB) - added by pishmishy 16 years ago.
Improved, extendable pre-flight checks
5235.patch (5.6 KB) - added by pishmishy 16 years ago.
Final draft of pre-flight checks

Download all attachments as: .zip

Change History (31)

#1 @westi
17 years ago

  • Description modified (diff)

#2 follow-up: @DD32
17 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
17 years ago

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

17 years ago

A rough draft

#4 @pishmishy
17 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
17 years ago

  • Keywords has-patch added; needs-patch removed

#6 @santosj
17 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
17 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
17 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
16 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.

16 years ago

Improved, extendable pre-flight checks

#10 @pishmishy
16 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.

16 years ago

Final draft of pre-flight checks

#11 @pishmishy
16 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
15 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
15 years ago

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

#15 @dd32
15 years ago

see also #9474

#17 @hakre
14 years ago

cross-referenced: #11466

#18 @hakre
14 years ago

Nice patch. Worth to get more attention.

#19 @hakre
14 years ago

  • Keywords dev-feedback added

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

#20 @nacin
14 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
14 years ago

Plugin material (dd32?)

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

#22 @chriscct7
10 years 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
9 years 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
9 years 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

#25 @chriscct7
9 years ago

  • Keywords dev-feedback removed

This ticket was mentioned in Slack in #core by dd32. View the logs.

8 years ago

#27 @kraftbj
7 years ago

I'm finding that with PHP 7, some OSes are no longer including the full default install of PHP—missing XML or MySQL libraries, etc. It would be nice to check for those and setup a way plugins can check/report (ctype for example) in a nice and consistent way.

#28 @audrasjb
3 years ago

  • Keywords needs-patch removed
  • Milestone Future Release deleted
  • Resolution set to worksforme
  • Status changed from accepted to closed

Closing this ticket as most of the proposal has been addressed with the Site Health initiative.
New ideas of implementations should ideally go into new, specific, tickets :)

Thanks all

Note: See TracTickets for help on using tickets.