Cannot Open Website nor WP Admin

What issue or error are you experiencing?

Everytime I click the button to open the WP Admin or to Open Site, a page with the following message shows up:
Fatal error : Cannot redeclare wp_global_styles_render_svg_filters() (previously declared in C:\Users\Rian\Local Sites\otwocom\app\public\wp-includes\deprecated.php:5276) in C:\Users\Rian\Local Sites\otwocom\app\public\wp-includes\script-loader.php on line 2493

There has been a critical error on this website.

Learn more about troubleshooting WordPress.

What should I do?

What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc


System Details

  • Local Version:

  • Operating System (OS) and OS version:


Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hi @Romeu-Queiroz

This is likely a conflict with a plugin/theme. I would start by using the Open Site Shell function to open up a window and with WP-CLI commands deactivate your plugins. Afterward you should be able to log in and then you can reactivate plugins one at a time to find the culprit.

Thank you Nick-B, but how do I deactivate the plugins? Sorry if this is a basic question, but I am still a rookie at this stuff.

No problem!

If you want to disable all of them at once the command would look like this:

wp plugin deactivate --all

More details about WP-CLI commands for this here:

There are other ways to go about this as well. If you wanted to use FTP for example. More details below:

hello, i have the same problem Fatal error: Cannot redeclare wp_global_styles_render_svg_filters() (previously declared in i tried to disable the plugins but i can´t

Hi @kikemen

Why can’t you disable plugins? Are you getting some type of error or other issue? What method to disable plugins were you trying?

this is the complete error, i tried to disable the plugins
Fatal error : Cannot redeclare wp_global_styles_render_svg_filters() (previously declared in /home/servername/webdomain/wp-includes/deprecated.php:5276) in /home/servername/webdomain/wp-includes/script-loader.php on line 2499

If you’re trying to disable plugins via CLI and it’s not working you might want to try using FTP instead.

1 Like

Hi guys, having the same problem than OP here:

  • Local version: 7.1.2+6410
  • Web server: Apache
  • Database: MySQL 8.0.16
  • PHP version: 8.1.9
  • WordPress version: 6.2.2

Getting the next error:

Fatal error: Cannot redeclare wp_global_styles_render_svg_filters() (previously declared in C:\Users\Jore\Local Sites\epicureum\app\public\wp-includes\deprecated.php:5276) in C:\Users\Jore\Local Sites\epicureum\app\public\wp-includes\script-loader.php on line 2493

Tried:

  • Disabling plugins via WP-CLI
  • Disabling plugins via Local’s site folder (don’t know if I can use FileZilla for this)

Were you able to solve the problem somehow or do you know how I can recover the development environment? Thank you guys!

Jorge.

Hi @joresnchz! I haven’t seen any solves for this yet.

Is this a site you just imported into Local or one you were previously working on in the app?

Critical errors generally are some sort of conflict with the site’s configuration. If this is a site you imported from elsewhere do the DB, PHP, WP and Server configurations all match what the site was built with?

1 Like

Hello @Nick-B! I have had this site in local for a few months now so it’s not just imported.

I think that the configuration is the same. Also I didn’t remember updating the WordPress ecosystem, I just updated LocalWP (but wasn’t working before updating still). The only think I touched was the wp-login.php to fix a known bug (Vote Unable to login, changing wp-config.php workaround). Is there a way to restore this file to the default?

Any other workaround to recover my site? Maybe restoring a backup but keeping the config as you said. Thank you so much!

It looks like there was a change in WordPress 6.3 that could be related to this.

I searched wp_global_styles_render_svg_filters() and found this page:

It mentions at the top that “This function has been deprecated. SVG generation is handled on a per-block basis in block supports instead.”

At the bottom of the article is the changelog which shows for 6.3 that mentions the same again.

Are you using WordPress 6.3 for this site or did you update it to that at some point while working on it? Have you tried swapping the theme out with CLI or FTP to see if that resolves the issue?

1 Like

Hello again @Nick-B, thank you for your responses and help.

I’m using WordPress 6.2.2 in this local installation. I’ve also tried renaming the folder of the theme that I’m using. After restarting the server, still the same error.

Do you know if I can recover the files in other local installation or something to recover my build? Thank you so much again!

@joresnchz

Do you know if I can recover the files in other local installation or something to recover my build?

I’m not sure what you mean here. Was this the site you exported from one machine and then imported to another? Would you still have a zip copy of the site how it was originally or did you already delete that? Would it be possible to get a fresh copy from the other machine?

Otherwise Local doesn’t have any native restore ability unless you’ve been backing up the site with our Cloud Backups feature. After that, you’d be looking at a time machine restore or Windows equivalent.

1 Like

Hi @Nick-B.

I’m not sure what you mean here. Was this the site you exported from one machine and then imported to another?

No, it was created originally on local. Was asking if there’s another method to recover my site without loading a backup. I have one but it lacks a lot of the changes I did. Maybe doing something with the files via FTP?

Was this the site you exported from one machine and then imported to another? Would you still have a zip copy of the site how it was originally or did you already delete that? Would it be possible to get a fresh copy from the other machine?

No, just created on local. I don’t have a zip but I have a backup from All-in-One WP Migration (which I can’t import because it is over 300KB and I don’t have the pro plugin xD).

I can try doing the windows restore point but I don’t know if I will be able to return to the current one and not lose the rest of the work. Any options or should I just try with All-in-One WP Migration Pro and restore the backup?

Thank you very much, best regards.

Sorry for my misunderstanding. There isn’t an auto backup or restore feature in Local so if something is gone then it might be lost to ether I’m afraid unless you want to try a Windows Time Machine equivalent. You could easily export and copy your current site to save that. Using Local’s native export feature or WP Migrate Lite (free) you can export it and then put that on a Google Drive, DropBox or external drive before doing your time machine.

Going forward you might want to get our Cloud Backups feature set up to make frequent saves and then also backup the site with the same export workflow to save another full copy.

1 Like

Thank you @Nick-B, gonna try windows time machine. We can close support if you want.

Best regards.

1 Like

Sounds good @joresnchz! You know where to find us if you run into any other issues or have further questions :slight_smile:

Anytime i try to access the wp-admin, it throws 502 bad gateway. please help

We would be happy to assist with your Local troubleshooting! Could you provide some more details to help us take a further look?

  • Does this happen for every site on Local even if you create a new blank one?

  • Did it work previously until a certain point like an update?

  • What is your OS?

  • What version of Local are you on?

  • Please attach a copy of your Local Logs

Keep us posted and we’d be happy to help further!