Title: Fatal error: Cannot declare class ComposerAutoloaderInit
Last modified: March 11, 2024

---

# Fatal error: Cannot declare class ComposerAutoloaderInit

 *  [pixtweaks](https://wordpress.org/support/users/pixtweaks/)
 * (@pixtweaks)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-cannot-declare-class-composerautoloaderinit-2/)
 * Hi, I have the same issue as [https://wordpress.org/support/topic/fatal-error-cannot-declare-class-composerautoloader/](https://wordpress.org/support/topic/fatal-error-cannot-declare-class-composerautoloader/)
   `**
   Fatal error**: Cannot declare class ComposerAutoloaderInit9bc748a33ab984c092a749a74d7b8261,
   because the name is already in use in`but I don’t have `db.php` anywhere on the
   disc. And it’s happening on the staging site I just created and it works fine
   on production. I tried reinstalling, an older version, but no success. How to
   make it work?

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

 *  Plugin Author [John Blackbourn](https://wordpress.org/support/users/johnbillion/)
 * (@johnbillion)
 * WordPress Core Developer
 * [2 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-cannot-declare-class-composerautoloaderinit-2/#post-17497572)
 * Can you try restarting the PHP process to clear the opcode cache? That’s about
   the only common issue between the small handful of reports of this that I’ve 
   seen.
 *  Thread Starter [pixtweaks](https://wordpress.org/support/users/pixtweaks/)
 * (@pixtweaks)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-cannot-declare-class-composerautoloaderinit-2/#post-17497909)
 * I tried to purge OPcache, change PHP version, no change, still it’s throwing 
   the same error. Any other suggestion?
 *  [JTweb](https://wordpress.org/support/users/evgeniypkt/)
 * (@evgeniypkt)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-cannot-declare-class-composerautoloaderinit-2/#post-17508699)
 * Greetings!
 * I have the same problem. Nothing helps. Activation of the plugin generates a 
   fatal error with any settings. How can I fix it?
 * ——-
   Приветствую!
 * У меня такая же проблема. Ничего не помогает. Активация плагина выдаёт фатальную
   ошибку при любых настройках. Как это починить?
 *  Thread Starter [pixtweaks](https://wordpress.org/support/users/pixtweaks/)
 * (@pixtweaks)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-cannot-declare-class-composerautoloaderinit-2/#post-17508719)
 * [@evgeniypkt](https://wordpress.org/support/users/evgeniypkt/) and [@johnbillion](https://wordpress.org/support/users/johnbillion/)
   
   I’ve found it! db.php wasn’t a file, it was a link that through my hosting’s 
   file manager wasn’t visible. Once I connected via FTP I saw it and deleted it.
   After that, the plugin activates fine.
 *  [JTweb](https://wordpress.org/support/users/evgeniypkt/)
 * (@evgeniypkt)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-cannot-declare-class-composerautoloaderinit-2/#post-17508763)
 * Here’s what I got after deleting the db.php link and activation of the Query 
   Monitor plugin (((
 * **Fatal error**: Cannot declare class ComposerAutoloaderInit9bc748a33ab984c092a749a74d7b8261,
   because the name is already in use in **/var/www/…/data/www/…/data/plugins/query-
   monitor/vendor/composer/autoload_real.php** on line **5**

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

The topic ‘Fatal error: Cannot declare class ComposerAutoloaderInit’ is closed to
new replies.

 * ![](https://ps.w.org/query-monitor/assets/icon.svg?rev=2994095)
 * [Query Monitor](https://wordpress.org/plugins/query-monitor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/query-monitor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/query-monitor/)
 * [Active Topics](https://wordpress.org/support/plugin/query-monitor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/query-monitor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/query-monitor/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [JTweb](https://wordpress.org/support/users/evgeniypkt/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-cannot-declare-class-composerautoloaderinit-2/#post-17508763)
 * Status: not resolved