Title: Fatal error: Namespace declaration
Last modified: July 31, 2019

---

# Fatal error: Namespace declaration

 *  [richardcoombs](https://wordpress.org/support/users/richardcoombs/)
 * (@richardcoombs)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-namespace-declaration/)
 * We’re getting the following error when trying to access our site:
    Fatal error:
   Namespace declaration statement has to be the very first statement in the script
   in /var/sites/m/magnetsteel.com/public_html/wp-includes/sodium_compat/lib/sodium_compat.
   php on line 2 Any help greatly appreciated! Thanks
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffatal-error-namespace-declaration%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Jacob Peattie](https://wordpress.org/support/users/jakept/)
 * (@jakept)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-namespace-declaration/#post-11784616)
 * Can you navigate to `/public_html/wp-includes/sodium_compat/lib/sodium_compat.
   php` Via FTP or cPanel File Manager, and share the first 10 or so lines from 
   that file? It should look like this: [https://github.com/WordPress/WordPress/blob/master/wp-includes/sodium_compat/lib/sodium_compat.php](https://github.com/WordPress/WordPress/blob/master/wp-includes/sodium_compat/lib/sodium_compat.php)
 * If it doesn’t, and there’s lines above `namespace Sodium;` for example, then 
   it’s likely your site has been compromised. If that’s the case, carefully follow
   [this guide](https://wordpress.org/support/article/faq-my-site-was-hacked/). 
   When you’re done, you may want to implement some (if not all) of [the recommended security measures](https://wordpress.org/support/article/hardening-wordpress/)
   and [start backing up your site](https://wordpress.org/support/article/wordpress-backups/).
 *  Thread Starter [richardcoombs](https://wordpress.org/support/users/richardcoombs/)
 * (@richardcoombs)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-namespace-declaration/#post-11784628)
 * Hi Jacob, thanks for the quick reply. When I try to navigate to the link, I just
   get:
    Your file was not found It may have been moved or deleted. ERR_FILE_NOT_FOUND
   Do you think the sites been compromised then? Thanks again!
 *  [Jacob Peattie](https://wordpress.org/support/users/jakept/)
 * (@jakept)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-namespace-declaration/#post-11785913)
 * ERR_FILE_NOT_FOUND is a browser error. As I said in my response you need to find
   the file via FTP or the File Manager in your hosting control panel, not visit
   it in your browser. If you don’t know how to do that you should contact your 
   host. Point them to this thread, it will help them understand what you’re trying
   to do.
    -  This reply was modified 6 years, 10 months ago by [Jacob Peattie](https://wordpress.org/support/users/jakept/).

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

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

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)
 * [Namespace declaration](https://wordpress.org/support/topic-tag/namespace-declaration/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [Jacob Peattie](https://wordpress.org/support/users/jakept/)
 * Last activity: [6 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-namespace-declaration/#post-11785913)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
