Fatal error

Hi everyone!
Please help resolve the following error:

Website: GNOSIS.GE

Error Message:

Fatal error : Uncaught Error: Undefined constant “‘FORCE_SSL_ADMIN’” in /home/vol11_1/epizy.com/epiz_30773473/htdocs/wp-config.php:87 Stack trace: #0 /home/vol11_1/epizy.com/epiz_30773473/htdocs/wp-load.php(50): require_once() #1 /home/vol11_1/epizy.com/epiz_30773473/htdocs/wp-blog-header.php(13): require_once(‘/home/vol11_1/e…’) #2 /home/vol11_1/epizy.com/epiz_30773473/htdocs/index.php(17): require(‘/home/vol11_1/e…’) #3 {main} thrown in /home/vol11_1/epizy.com/epiz_30773473/htdocs/wp-config.php on line 87

Take note

5 Likes

That doesn’t seem like a WordPress corruption to me, but more like an error in your wp-config.php.

Looking at the documentation from WordPress, the FORCE_SSL_ADMIN setting could be set in the wp-config.php file to enforce SSL. But it should only ever be set, not used there, which your code appears to be doing.

Did you try to set the FORCE_SSL_ADMIN parameter in your wp-config.php? If so, could you please share what code you added exactly?

4 Likes

Thanks for the reply. No I haven’t done anything. The website crushed suddenly by itself. I don’t really know what exactly is there to fix.

I tried to upload new Wordpress and now I have new error:

Fatal error : Uncaught Error: Call to undefined function wp() in /home/vol11_1/epizy.com/epiz_30773473/htdocs/wp-blog-header.php:16 Stack trace: #0 /home/vol11_1/epizy.com/epiz_30773473/htdocs/index.php(17): require() #1 {main} thrown in /home/vol11_1/epizy.com/epiz_30773473/htdocs/wp-blog-header.php on line 16

It doesn’t seem like you uploaded a complete and correct copy of WordPress. Or some files failed to transfer so you may have ended up with a corrupted copy of WordPress.

If you want to fix this existing installation, you can do so like this:

4 Likes

I downloaded wp-content folder via filezilla, then I reinstalled Wordpress and uploaded the content folder again. However now I see only sample theme on my website, no content, no files, no users. I have checked database settings in wp-config and it seems correct. I also checked wp-content folder and my old files are all there. Any idea what might fix this?

Edit: In Scriptinstall I see a completely different database info from what I see on MySQL, which is confusing.

You’ve pretty much answered your own question.

If you installed a fresh copy of WordPress, you most likely got a new database too, or at least a new set of tables, which contain all the content and settings of your site.

As long as the database and tables were not deleted, you can still recover them. But it’s a bit more complicated.

And there is a reason why the guide I linked to does not say to reinstall anything.

The goal is to update the wp-config.php of your site so it uses the database tables of your previous site. That, along with your wp-content folder, should restore your old site.

So I can give you appropriate instructions, can you please tell:

  • Did you reinstall WordPress with Softaculous or by hand?
  • Did you delete or overwrite old WordPress files when reinstalling?
  • Did you create a new database when installing WordPress (Softaculous does this by default, but you don’t have to when installing by hand) or reuse your existing database?
4 Likes

To answer your questions:

  1. I reinstalled WordPress with Softaculous
  2. Before installing I downloaded wp-content folder and deleted everything in htdocs (mainly because when I tried to overwrite Wordpress files I got an error of not enough quota)
  3. Softaculous created wp-config where the database username and password were different from MySQL on infinityfree, so I changed it manually to the existed one.

Edit: One thing to note, I was not able to log in with my Wordpress account to the wp-admin, it said my account did not exist. When softaculous installed new Wordpress I think it re-created my account.

Hey there, Is your problem solved now?

You can do it via Softaculous

4 Likes

Hey. No, far from it…

Can you please tell me the issue you are having at the moment?

My website was down for some reason. It seemed the Wordpress update gone wrong. So I downloaded my wp-content folder, deleted everything in htdocs, then installed Wordpress again with Softaculous and re-uploaded content folder. But my old website is gone and I only see new, sample theme. No posts, no pictures, no users, nothing…

First check for the old database, where your old posts are stored.

And if you can please share the website’s link

It’s Gnosis.ge

I think in wp-config I have set the old database settings but still nothing.
(could you please read the thread from the beginning so that you have a better idea how I ended up in this situation? :smiley: )

Sorry for the late reply, I’ve read your issue. And according to it, this Is what I can tell you.

Ensure that you’ve replaced the correct htdocs folder. Confirm that you’ve copied the old WordPress files into the correct directory where your new WordPress installation is expecting them.

Also,

If your old WordPress installation used a different database prefix than the new one, it can cause issues. Ensure that the wp-config.php file in the old WordPress files matches the correct database prefix.

Thank you for the information.

If you installed a new copy of WordPress with Softaculous, then Softaculous will have created a new database, which is different from the database of your old site. But we can link your new WordPress installation to the old database to basically restore it to how it was before.

Update the database name

First you need to find the name of the database.

Start by going into the file manager and checking the wp-config.php file. In it is the DB_NAME setting.

Then in the client area or control panel, you can see the list of MySQL Databases. You should have two values there: one which is the database of your old site, and one which is the new site.

The database in the wp-config.php is currently one of those two databases. You’ll want to change it to the other one.

Update the table prefix

WordPress supports having multiple installations in the same database. To keep them separate, WordPress prefixes every database with a prefix like wp1Bc_.

Open the database for your old site, and look for the prefix, the same value that’s before every table name.

Then, go back to the wp-config.php file, and find the $table_prefix setting. Update that value to match the prefix you found in the database.


That’s it! If you updated both settings to the correct value, and the database is in-tact, you should now be able to open your website and see all your pages and settings!

4 Likes

Thank you for the reply. Upon checking the info the prefix of the table matches my old database. Upon checking the tables in the database I see that old posts are erased and are replaced by the sample, hello world, etc. only 5 posts are there while it should have been 20 or more.
Could it be that new installation wrote over the old database and is now erased?
And can my backup wp-content folder do something in that case?

Yeah it could be.

I don’t think so. If you haven’t dumped the database with the wp-content folder, you can’t retrieve the database data.

2 Likes