Title: PHP Error after update
Last modified: July 31, 2020

---

# PHP Error after update

 *  Resolved [Ivijan-Stefan Stipic](https://wordpress.org/support/users/ivijanstefan/)
 * (@ivijanstefan)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/php-error-after-update-10/)
 * Hi, my error log start to bi filled with this error after latest update!
 * `[31-Jul-2020 10:02:24 UTC] PHP Warning: You cannot overrule a WPSEO standard
   variable replacement by registering a variable with the same name. Use the &quot;
   wpseo_replacements&quot; filter instead to adjust the replacement value. in /
   public_html/wp-content/plugins/wordpress-seo/inc/class-wpseo-replace-vars.php
   on line 136`

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Support [Maybellyne](https://wordpress.org/support/users/maybellyne/)
 * (@maybellyne)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/php-error-after-update-10/#post-13194394)
 * Hello Ivijan-Stefan,
 * Thanks for reaching out!
 * Looking at the error details, this may happen when the plugin files are cached
   and some old files are still used after updating the plugin. Sometimes, it causes
   temporary errors that resolve themselves once the cache has been cleared.
 * If the problem doesn’t resolve for you automatically, can you please try clearing
   the cache from your theme, plugin, server and CDN (e.g. CloudFlare) before and
   after updating Yoast SEO? If you are not sure how to clear the cache from a theme
   or plugin please speak to those authors. If you want to clear cache from the 
   server, please speak to your host provider.
 * Thank you.
    -  This reply was modified 5 years, 10 months ago by [Maybellyne](https://wordpress.org/support/users/maybellyne/).
 *  Thread Starter [Ivijan-Stefan Stipic](https://wordpress.org/support/users/ivijanstefan/)
 * (@ivijanstefan)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/php-error-after-update-10/#post-13196926)
 * I don’t think it’s relevant to cash.
 * I tried everything and nothing has changed. I’m a PHP developer too but I haven’t
   seen a problem like this before.
 * Should I try to download the plugin manually and replace the files on the server?
 *  [devnihil](https://wordpress.org/support/users/devnihil/)
 * (@devnihil)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/php-error-after-update-10/#post-13197083)
 * [@ivijanstefan](https://wordpress.org/support/users/ivijanstefan/) If the error
   occurred immediately following an update it’s possible that something went wrong
   during the update that caused the plugin’s files to become incomplete or damaged.
   Can you please try performing a manual update of the plugin and see whether this
   resolves the error? We have instructions on how to upgrade the plugin manually
   at the following link: [https://kb.yoast.com/kb/how-can-i-update-my-free-plugin/#ftp](https://kb.yoast.com/kb/how-can-i-update-my-free-plugin/#ftp).
   You will need an FTP program such as FileZilla and your FTP details, which can
   be obtained from your host provider.
 *  Thread Starter [Ivijan-Stefan Stipic](https://wordpress.org/support/users/ivijanstefan/)
 * (@ivijanstefan)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/php-error-after-update-10/#post-13202526)
 * I am programmer last 17 years, I know how to use FTP.
 * I did a manual update and problem still exists. I don’t use cache plugins, I 
   reset all possible caches I knew, restarted the server, I use PHP 7.3 and I still
   have the same problem.
 * My error log is 2GB for the last 3 days. All I have to do is remove Yoast SEO
   and move to some other solution.
 * Or you have some another idea?
    -  This reply was modified 5 years, 10 months ago by [Ivijan-Stefan Stipic](https://wordpress.org/support/users/ivijanstefan/).
 *  [Pcosta88](https://wordpress.org/support/users/pcosta88/)
 * (@pcosta88)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/php-error-after-update-10/#post-13203454)
 * Hi,
 * From what we can gather, it seems to be an error Yoast tosses out when you have
   custom template variables that is the same name as the default ones Yoast/WordPress
   uses.
 * We would like some more information.
 * 1. Can you confirm you are using WordPress 5.4.2? You can check by clicking on
   the W in the top left and selecting About. If you need to update, please check
   with your host provider. Please know that if you are using an older version of
   WordPress Core you may experience unexpected behavior with Yoast. This guide 
   explains more: https://yoast.com/why-we-dont-support-old-wordpress-versions/.
 * 2. Are all your non-Yoast plugins and themes also updated?
 * 3. To clarify, you are on, v14.6.1 of Yoast SEO Premium?
 * 4. Did you create or are using any kind of custom template variable to try to
   output data such as in the title or meta description fields? For example, if 
   you go to SEO-Search Appearance and click around at the different tabs and click
   on the different items that appear and look at the purple circles (what we call
   template variables) are any of those using the defaults? You can learn more about
   the default template variables here: [https://yoast.com/help/list-available-snippet-variables-yoast-seo/#default-variables](https://yoast.com/help/list-available-snippet-variables-yoast-seo/#default-variables)
 *  Thread Starter [Ivijan-Stefan Stipic](https://wordpress.org/support/users/ivijanstefan/)
 * (@ivijanstefan)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/php-error-after-update-10/#post-13206418)
 * You are right. I just find what is happening.
 * I have one part of code where I create new Yoast SEO variables using `wpseo_register_var_replacement()`
   to add geo information inside your plugin. This is old code what is added last
   year and I forgot on it.
 *     ```
       if ( is_plugin_active( 'wordpress-seo/wp-seo.php' ) || is_plugin_active( 'wordpress-seo-premium/wp-seo-premium.php' ) ) {
       	add_action('wpseo_register_extra_replacements', 'wpseo_register_extra_replacements', 99);
       }
       function wpseo_register_extra_replacements(){
   
       	if(!function_exists('wpseo_register_var_replacement'))
       	{
       		if(file_exists(dirname(CFGP_ROOT).'/wordpress-seo/inc/class-wpseo-replace-vars.php'))
       		{
       			include_once(dirname(CFGP_ROOT).'/wordpress-seo/inc/class-wpseo-replace-vars.php');
       		}
       		else if(file_exists(dirname(CFGP_ROOT).'/wordpress-seo-premium/inc/class-wpseo-replace-vars.php'))
       		{
       			include_once(dirname(CFGP_ROOT).'/wordpress-seo-premium/inc/class-wpseo-replace-vars.php');
       		}
       		else return;
       	}
   
       	if(!function_exists('wpseo_register_var_replacement')) return;
   
       	$CFGEO = $GLOBALS['CFGEO'];
       	if(is_array($CFGEO))
       	{
       		$collection = array();
   
       		foreach($CFGEO as $key => $val){
       			wpseo_register_var_replacement( '%%' . $key . '%%', function() use ($val){
       				return $val;
       			}, 'advanced', $key );
       		};		
       	}
       }
       ```
   
 * Please tell me, does this mean that my code has a variable that has the same 
   name as your registered variable?
 * Thanks!
 *  Plugin Support [Michael Tiña](https://wordpress.org/support/users/mikes41720/)
 * (@mikes41720)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/php-error-after-update-10/#post-13206476)
 * Hi,
 * Thank you for your response. Based on your custom code, it looks like we’ll have
   to investigate this further to confirm.
 * Could you confirm you have an active Yoast SEO Premium subscription? If so, please
   feel free to contact us directly in order to avail of our premium support and
   reference this forum thread as well — [https://yoast.com/help/support/#premium](https://yoast.com/help/support/#premium)
 *  Thread Starter [Ivijan-Stefan Stipic](https://wordpress.org/support/users/ivijanstefan/)
 * (@ivijanstefan)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/php-error-after-update-10/#post-13206490)
 * I don’t have a premium yet.
 * I had it a couple of years ago, now I only use the free version.
 * Thanks!
 *  [Jeroen Rotty](https://wordpress.org/support/users/jeroenrotty/)
 * (@jeroenrotty)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/php-error-after-update-10/#post-13206663)
 * Hi [@ivijanstefan](https://wordpress.org/support/users/ivijanstefan/),
 * As much as we hate to say it, your question goes beyond the technical expertise
   of me and my colleagues on the Yoast support team. This means we can’t give you
   a solid answer to your question.
 * But we don’t want to leave you empty-handed either, that’s why we’ve created 
   our developer portal at [developer.yoast.com](https://developer.yoast.com/). 
   This has proven to be useful to many developers in the past, and hopefully will
   serve you well too.
 * Sorry we can’t be of more help on your custom code.
 *  Thread Starter [Ivijan-Stefan Stipic](https://wordpress.org/support/users/ivijanstefan/)
 * (@ivijanstefan)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/php-error-after-update-10/#post-13206706)
 * Everything is clear to me, don’t worry.
 * This was helpful because now I know where the mistake is and what I need to do.
   I reviewed your algorithm and found a solution.
 * Thanks a lot!
 *  [Jeroen Rotty](https://wordpress.org/support/users/jeroenrotty/)
 * (@jeroenrotty)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/php-error-after-update-10/#post-13206715)
 * Awesome, thank you for letting us know.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘PHP Error after update’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

## Tags

 * [php-error](https://wordpress.org/support/topic-tag/php-error/)

 * 11 replies
 * 6 participants
 * Last reply from: [Jeroen Rotty](https://wordpress.org/support/users/jeroenrotty/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/php-error-after-update-10/#post-13206715)
 * Status: resolved