Posted on May 11, 2021

Database source name (DSN) of SQLite for Live update.


The filter hook “ip-location-block-live-log” assigns the database source name of SQLite for Live update.


  • $dsn
    (string) get_temp_dir() . “ip-location-block-live-log-%d.sqlite” (%d is blog ID)

Use case

The following code in your functions.php can override the default value.

function my_sqlite_dsn( $path ) {
    return '/tmp/' . basename( $path );
add_filter( 'ip-location-block-live-log', 'my_sqlite_dsn' );


This plugin uses PDO_SQLITE driver. If you specify :memory: as an DSN, then “Live update” would not work properly because PDO::ATTR_PERSISTENT is set as false in a constructor of PDO.

NOTE: When you select "mu-plugins" (ip-location-block-mu.php) as Validation timing , you should put your code snippet into drop-in.php in Geolocation API folder instead of functions.php. See My custom functions in “functions.php” doesn’t work. in FAQ for detail.