Set site title & tagline with wp.config or function.php
Question
Currently I can change Site Title
& Tagline
in Settings >> General but someone attack and remove it.
So now I want to set these via function.php or wp-config.php
Any Idea?
Solution
These fields have the keys 'blogname'
and 'blogdescription'
respectively in the options table.
I'm not sure exactly why you need to do this as it seems like a priority to secure your site and be able to update it through the dashboard yourself, but you can update them easily from functions.php
with update_option
, e.g.:
update_option( 'blogname', "site title goes here" );
update_option( 'blogdescription', "site tagline does here" );
Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange