Adding advanced custom fields faster

Daniel Lowes
Daniel Lowes used Ask the Experts™
on
I would like to update fields in an existing group the custom fields in WordPress more quickly  in a "BATCH form" did anyone here mange to do it without messing up.
for example I want to start with adding extra text fields to an existing group,
Maybe MYSQL request ?
Maybe JSON request.
has anyone done this ?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
David FavorFractional CTO
Distinguished Expert 2018

Commented:
First, ACF is slow. If you're tooling a Website which will be receiving large amounts of traffic, avoid using ACF.

ACF is ACF. There is no way to increase update speed, unless you rewrite ACF or use some other facility.

ACF slowness relates to database I/O, so no matter how you approach kicking off your updates, you'll still have to do database I/O.

Install the Query Monitor plugin + enable SAVEQUERIES in your wp-config.php file + then perform some action.

Then click on the Debug Bar to review your database I/O.

I once did a site audit which used ACF + it took >700 database I/O per page to render the page.

This type of database I/O will always produce slow results, whenever the backend server has the slightest bit of load.

Fixes: Range from simple to complex.

You can run mysqltuner + ensure all your database SELECTs prefer memory to disk.

If this fails, you can run a pure memory database. This option is complex + requires a very smart person to setup + maintain.

Best fix is to replace ACF with another coding approach.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial