wireInstance() function

Get or set the current ProcessWire instance

Available since version 3.0.125.


// basic usage
$processWire = wireInstance();

// usage with all arguments
$processWire = wireInstance($wire = null);


wire (optional)ProcessWire, Wire, null

To set specify ProcessWire instance or any Wire-derived object in it, or omit to get current instance.

Return value

Functions methods and properties

API reference based on ProcessWire core version 3.0.234

Latest news

  • ProcessWire Weekly #511
    In the 511th issue of ProcessWire Weekly we'll cover the latest core updates, introduce a new third party module called Auto AVIF, and more. Read on!
    Weekly.pw / 25 February 2024
  • Using date range fields in ProcessWire
    This week we'll take a detailed look at the newest addition to the ProFields set of modules: the Date Range Fieldtype and Inputfield.
    Blog / 24 November 2023
  • Subscribe to weekly ProcessWire news

“ProcessWire is like a breath of fresh air. So powerful yet simple to build with and customise, and web editors love it too.” —Margaret Chatwin, Web developer