jQuery not define in the wordpress wp-admin

2019-06-13 05:01发布

I am using 4.1 verion of wordpress, I have tried wordpress version 3.8.1 etc, in wp-admin it is throwing jquery is not defined error. I have tried uninstalling all the plugins, deleting all the wp-admin and wp-includes files.

I have tried the following codes in wp-config,

   define('CONCATENATE_SCRIPTS', false);
   define('SCRIPT_DEBUG', true);

none of them are working, any help, Thanks

2条回答
祖国的老花朵
2楼-- · 2019-06-13 05:29

I see this problem a website, in fact it was due to a hacked website :

  1. download a fresh WP install ZIP, same version as yours
  2. use FTP to delete wp-include and wp-admin from your website
  3. unzip the WP install zip, and FTP upload clean wp-include and wp-admin
  4. Go to your WP admin, and it must be available now

The wp-include and wp-admin folders must not be touched, they are a part of the WP basic install. That's why they can be safely removed and replaced by clean ones without risk.

查看更多
\"骚年 ilove
3楼-- · 2019-06-13 05:49

I opened up the devtools console on your site, and found that when it tries to include jQuery from http://www.coasterline.com/wp-includes/js/jquery/jquery.js/?ver=1.11.0 it's actually returning your homepage, not a JS file. I've seen this before when the .htaccess file isn't set up right.

In WordPress, the .htaccess file redirects all requests to anything under your main WP directory to the index.php file, but there's supposed to be an exception for resource files like images, JS, and CSS. I'm guessing your .htaccess file is corrupt and is redirecting EVERYTHING to index.php, even JS files.

This is what .htaccess is supposed to look like:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

These 2 lines exclude files (!-f) and directories (!-d) from the rewrite condition:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

Make sure those are intact.

查看更多
登录 后发表回答