[wp-trac] [WordPress Trac] #51507: Ability to use as a framework
WordPress Trac
noreply at wordpress.org
Tue Oct 13 09:36:27 UTC 2020
#51507: Ability to use as a framework
--------------------------+-----------------------------
Reporter: ttodua | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
WordPress provides more than 600+ framework-like functions
(get_option/set_option, transcients, sanitize-functions and more, which
[https://puvox.software/blog/available-functions-class-during-shortinit-
wp/ are seen in test]).
I doubt that there may be other people like our company, where we use
WordPress as a backend helper framework, to make use of it's goodies
(hundreds of useful functions).
As speed & performance matter, people has asked for this feature many
times (i.e. [https://wordpress.stackexchange.com/questions/28342/is-
there-a-way-to-use-the-wordpress-users-but-without-loading-the-entire-
wordpre example1] or [https://puvox.software/blog/include-wordpress-wp-
core-without-database/ example2])
It might be some useful to have one additional alternative for "SHORTINIT"
constant:
- SHORTINIT_WITHOUT_DB (to return from "wp-settings.php" right before
`require_wp_db()`)
# Performance gains #
Per my tests, compared to `SHORTINIT`, this approach loads wp-core about
10x faster (avoiding DB calls, etc).
Attaching the patches.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51507>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list