Title: Fatal error: Namespace declaration statement
Last modified: March 4, 2025

---

# Fatal error: Namespace declaration statement

 *  Resolved [Andrea Scarfo’](https://wordpress.org/support/users/andreascarfo/)
 * (@andreascarfo)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/fatal-error-namespace-declaration-statement-3/)
 *     ```wp-block-code
       PHP Fatal error:  Namespace declaration statement has to be the very first statement or after any declare call in the script in /home/[...]/installer.php on line 11
       ```
   
 * When I launch installer I get blank page and get a this error_log.
 * I came from an installation with:
    - php 8.0.30
    - WordPress 6.6.2
    - Duplicator 1.5.11.2
 * And I am going to a server with:
    - php 8.1

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

 *  Plugin Support [mohammedeisa](https://wordpress.org/support/users/mohammedeisa/)
 * (@mohammedeisa)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/fatal-error-namespace-declaration-statement-3/#post-18341435)
 * Hello [@andreascarfo](https://wordpress.org/support/users/andreascarfo/) ,
 * Thanks for reaching out to us.
 * Can you please open the installer.php file and check if there are empty lines
   at the top of it? If so, please remove these lines and retry the installation.
 * I’m looking forward to hearing back from you.
 * Thanks!
 *  Thread Starter [Andrea Scarfo’](https://wordpress.org/support/users/andreascarfo/)
 * (@andreascarfo)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/fatal-error-namespace-declaration-statement-3/#post-18341665)
 * Yep!
 * It worked!
 * There was a blank line at the top.
 * Thanks for the support.
 *  Plugin Support [mohammedeisa](https://wordpress.org/support/users/mohammedeisa/)
 * (@mohammedeisa)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/fatal-error-namespace-declaration-statement-3/#post-18344293)
 * Hi [@andreascarfo](https://wordpress.org/support/users/andreascarfo/) ,
 * I’m glad that it works and thanks for letting us know.
 * If you have any other questions or need assistance, please don’t hesitate to 
   open a new [support topic](https://wordpress.org/support/plugin/duplicator/),
   we are happy to help you.
 * I’m going to go ahead and close this thread for now. But if you’d like us to 
   assist further, please feel welcome to continue the conversation.
 * Thanks!
 *  [2candela2](https://wordpress.org/support/users/2candela2/)
 * (@2candela2)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/fatal-error-namespace-declaration-statement-3/#post-18380549)
 * Hello and thanks for the plugin.
 * I had no errors in php log, but I see that the a line was added to the installer.
   php at the begining. Is it any change that we can do for the future that new 
   line is not there?
 * Thanks
 *  Plugin Support [mohammedeisa](https://wordpress.org/support/users/mohammedeisa/)
 * (@mohammedeisa)
 * [1 year ago](https://wordpress.org/support/topic/fatal-error-namespace-declaration-statement-3/#post-18488135)
 * Hi [@andreascarfo](https://wordpress.org/support/users/andreascarfo/) ,
 * I’m sorry for the late reply, I lost this topic somehow.
 * This is an edge case that rarely happens with Duplicator Pro, and we don’t know
   what is the exact reason why this line is added.
 * If you would like that we investigate this issue further, please create a new
   ticket in our website [https://duplicator.com/contact/?form=1](https://duplicator.com/contact/?form=1)
   and we will do our best to help you.
 * Thanks!

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

The topic ‘Fatal error: Namespace declaration statement’ is closed to new replies.

 * ![](https://ps.w.org/duplicator/assets/icon-256x256.png?rev=2906985)
 * [Duplicator - Backups & Migration Plugin - Cloud Backups, Scheduled Backups, & More](https://wordpress.org/plugins/duplicator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/duplicator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/duplicator/)
 * [Active Topics](https://wordpress.org/support/plugin/duplicator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/duplicator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/duplicator/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [mohammedeisa](https://wordpress.org/support/users/mohammedeisa/)
 * Last activity: [1 year ago](https://wordpress.org/support/topic/fatal-error-namespace-declaration-statement-3/#post-18488135)
 * Status: resolved