Jero Dungog
Jero Dungog

Reputation: 379

Undefined function wptexturize()

I'm really new to wordpress and I had just encountered this error:

Uncaught Error: Call to undefined function wptexturize() in /var/www/wp-admin/menu-header.php:141

I also tried checking on https://developer.wordpress.org/reference/functions/wptexturize/ and I had traced the callers and functions used by this wptexturize() to no avail.

The main issue seems to be that the function is undefined. So I checked on the formatting.php file and there it was, clearly defined.

My guess is that the function is being called before it was even initialized. But please correct me if I am wrong.

If someone had encountered this issue before, I would really love to have some of your guidance on resolving this issue.

Thank you

Upvotes: 0

Views: 1545

Answers (6)

Jero Dungog
Jero Dungog

Reputation: 379

sorry for the very long update.

We were able to finally resolve this. The site was under a malware attack and it was disrupting all the critical files for our site to properly function.

so a malware cleanup resolved the issue.

Thanks to GoDaddy Support for pointing this out and helping to resolve it

Upvotes: 0

Tanapruk Tangphianphan
Tanapruk Tangphianphan

Reputation: 803

I can reproduce it by restarting apache2.

systemctl restart apache2

Still I cannot find a way to resolve it. I may try later when the website usage is low. I will come and update later once I can find a solution for it.

Upvotes: 0

Christian Mielke
Christian Mielke

Reputation: 11

I also tried to fix this issue by overwriting the the directories

wordpress/wp-admin wordpress/wp-includes

After that, the website was okay again, but one day after the problem was back again.

Upvotes: 0

Krishna Pariyar
Krishna Pariyar

Reputation: 111

Using fresh wp-includes solved the undefined fatal error. But the main issue is that it is related with malware infection. There was latest issue with Vulneribility with pluging wp-file-manager. I am also looking into if that's the main reason.

https://wordpress.org/support/plugin/wp-file-manager/reviews/

Upvotes: 0

Yazid Erman
Yazid Erman

Reputation: 1186

The answer of Arda Tunccekic would fix your problem, but not for a long time! Most probably your site is infected by some MalWare, in order to confirm, try to install special MalWare and security plugins like WebDefender for example, and scan your code.

Upvotes: 1

Arda Tunccekic
Arda Tunccekic

Reputation: 31

I started getting the same error too. I think it's because of a plugin but I'm not sure which one.

To correct it, download wordpress (latest.zip), unzip it in your website root directory. Then refresh your wordpress installation by overwriting the wp-admin and wp-includes directories.

cd /var/www/yoursite
wget https://wordpress.org/latest.zip
unzip latest.zip

cp -R wordpress/wp-admin .  
cp -R wordpress/wp-includes .

chown -R www-data:www-data wp-admin; 
chown -R www-data:www-data wp-includes;

Then you will get rid of the error.

Upvotes: 3

Related Questions