HTTP/2 301
server: nginx
date: Tue, 07 Oct 2025 22:26:49 GMT
content-type: text/html; charset=UTF-8
location: https://developer.wordpress.org/reference/functions/update_blog_details/
x-content-type-options: nosniff
content-language: en
x-ua-compatible: IE=Edge
vary: Accept-Encoding, Cookie
expires: Thu, 01 Jan 1970 00:00:00 GMT
cache-control: no-cache, no-store, max-age=0, must-revalidate
pragma: no-cache
alt-svc: h3=":443"; ma=86400
strict-transport-security: max-age=31536000
HTTP/2 200
server: nginx
date: Tue, 07 Oct 2025 22:26:50 GMT
content-type: text/html; charset=UTF-8
vary: Accept-Encoding
x-olaf: ⛄
vary: accept, content-type
link:
; rel="https://api.w.org/"
link:
; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
x-frame-options: SAMEORIGIN
content-encoding: gzip
alt-svc: h3=":443"; ma=86400
x-nc: MISS ord 1
update_blog_details() – Function | Developer.WordPress.org
update_blog_details( int $blog_id, array $details = array() ): bool
Updates the details for a blog and the blogs table for a given blog ID.
$blog_id
intrequiredBlog ID.
$details
arrayoptionalArray of details keyed by blogs table field names.
Default:array()
bool True if update succeeds, false otherwise.
function update_blog_details( $blog_id, $details = array() ) {
if ( empty( $details ) ) {
return false;
}
if ( is_object( $details ) ) {
$details = get_object_vars( $details );
}
$site = wp_update_site( $blog_id, $details );
if ( is_wp_error( $site ) ) {
return false;
}
return true;
}
View all references View on Trac View on GitHub
User Contributed Notes
You must log in before being able to contribute a note or feedback.