Verifying Wordpress site in Google search console for holding a good ranking is crucial. Also Google analytics is necessary for tracking your site status. To verify wordpress site, Google ask you to add a html code in the head of your theme. But if you change your theme anytime then you may need to re-verify the new theme in Google products. To avoid the problems you can use the following plugin in your admin panel.
“Insert Headers and Footers” plugin
The plugin is very effective for any kind of verification apart from Google. It allows you to insert code or text in the header or footer of your WordPress theme without touching the theme files. The plugin has its own option of header and footer which manage your additional codes in terms of your theme files. So, if you change your theme then the new theme file header and footer will use its codes automatically. In that case it is not necessary to re-verify your site. The plugin allow you to insert code like Google Analytics, custom CSS, Facebook Pixel etc.
Download this Free plugin-Insert Headers and Footers
Also see-
Free must have WordPress plugins and tools for any WordPress website
How to solve 404 problems and manage 301 redirects in WordPress