0

Error

Wordpress doesn't start - 500 Error : PHP Fatal error:  Call to undefined function define() index.php on line 14

Line # 14 : define('WP_USE_THEMES', true);

it works sometimes, it doesn't work and shows the above error, please help me to find the cause.

Peter
  • 762
  • 2
  • 12
  • 34
Senthil
  • 1
  • 1
  • 3
  • 1
    According to https://stackoverflow.com/questions/34131252/call-to-undefined-function-define it could be a memory issue. That would explain that it sometimes works and sometimes doesn't. Check if the answers/comments in that post can help you. – Dirk Scholten Sep 26 '18 at 11:12
  • Thanks Dirk, I've tried it already, but still same error raised. – Senthil Sep 26 '18 at 11:17

1 Answers1

0

This is a tough one to answer without lots of background information, is this perhaps nginx with php-fpm where php can't find the file included in the "require" part that comes at the end of index.php?

require( dirname( __FILE__ ) . '/wp-blog-header.php' );

The above line is at the end of index.php and it eventually includes all the wordpress functionality. If your server cant find that file, and that is where I guess the error comes from.

(Sorry, I dont have enough points to comment, so it had to become an answer).

Fredrik
  • 207
  • 1
  • 6
  • Thanks Fredik, This is in Wordpress, starting Index.php have this line & on that line itself, shows this error. Thank n advance, please help me how to trace this. – Senthil Sep 26 '18 at 11:18
  • You need to say what webserver you run, how php is run and which versions. Also if there is anything in the php or webserver error logs. – Fredrik Sep 26 '18 at 12:53
  • it was hosted on Windows 2012 server - IIS 7, PHP - 5.5. Wordpress latest version of 4.9.8 – Senthil Sep 26 '18 at 14:10