wp-load.php file is getting empty - wordpress

I have multiple WordPress websites. All of them have been running fine for a long time. But suddenly my WP websites shown the error:
This page isn’t working
When I investigate the problem I found this in the error log:
"Uncaught Error: Call to undefined function wp() in /home/nc136xrqx05i/public_html/wp-blog-header.php:16"
and the wp-load.php file is 0.
Then I rename the plugin files. Then the websites run but if I try to install a plugin from the plugin folder from dashbaord, wp-load file is becoming empty again and the site goes down.
How can I solve that?

The solution to this issue is to set the permission of the wp-load file to 444 after copying the contents back into the file, but you have to do it quickly because whatever is emptying the file is doing it very fast. I had the very same issue today and tech support for both web host that I am with di

I had the same issue with my site and now I changed the wp-load.php file's permission from 644 to 444 as shown in the image below.
Also, I suggest you to take regular backup and replace the core files of Wordpress.

I had this problem, and found malicious files located in my wp-content folder (which were thus not overwritten during the re-upload of the WP core files. )
I removed these files - as they were responsible for emptying the wp-load file and the problem was solved :)

Related

Wordpress Failed to load resource

I'm having weird issues after installing WordPress, (using a subdomain and separate directory) it seems that files are not loading properly.
Freshly installed WordPress
Using the default theme
No https thing
I did contact the host support about this (I did assume that it's a permission issue) and he even temporarily set the directory permission to 777 and files to 666 to see if that resolves the issue. but unfortunately, it didn't. We tried everything already still doesn't work! I'm stuck
If i understand properly, your js & css files are not loading. correct?
check your js & css file path in inspect. its proper or not?
Try reloading your files, make sure your folders are appropriately named according to your code and linking between pages/folders.
Good luck
Failed to load resource: the server responded with a status of 404 (Not Found
I think the folders path is not correct.check once your files path and reload. Check once your CSS and JS path names also then again reload the page

Drupal Site configuration issues

Good day every one,
I am new in DRUPAL.
I am having problem with the drupal site.
I got the repository for the drupal site. I have successfully clone it and got every things and the database. I have uploaded the database to the local host server.
Now, I can see that initially the directory is like this
C:\wamp\www\test\site\docroot\sites\default\
Then when i first open the site through local host the directory automatically becomes like this
C:\wamp\www\test\site\docroot\sites\default\file
The "file" directory contains the empty folder of css, images etc/
which I believe is downloaded from the database for the first time.
The site is giving many console error like missing images etc.
Instead of having the empty folder in file directory there must be images and css files and everything I do not know what is wrong becs the folder should not be empty there must be files and and image sand css files and should be downloaded from the database when I first open the site.
Please help me to locate the problem.
Thank you very much.
Usually, you will put on git drupal core, modules and theme files.., basically everything except the files uploaded by user (admin). Those files are usually located at:
/sites/default/files
So, since they are not on git repo you need to copy them to your local environment from the working site (i.e. over (S)FTP).
If your "file" is not "files" dir I'm talking about then it's something specific to your site - don't know nothing about it.

Windows server file permissions for Wordpress

I have wordpress on my windows server. Pictures and files are uploading but when i trying to access these files the server showing up with
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
When I searched for error i found some solutions about IIS but it didn't work. Can anyone cross with this permission error? And what is the solution.
Thanks
When you upload a file, PHP sends the file to a temporary directory on your server's hard drive (usually C:\Windows\Temp) and then copies it over to the proper directory. Once the file has is initially put in the temporary directory, it gets the permissions of that directory. The problem is when Windows moves that file to the proper place, it keeps the temporary directory’s permissions, which can cause access problems.
The way to fix this is to change the temporary directory to a folder within your WordPress installation, usually wp-content/upgrade.
To do this, follow these directions:
Find your php.ini file.
Find the upload_tmp_dir line, and change it to the wp-content/upgrade folder.
Browse to this folder and verify that the permissions are set properly.
You should then have the ability to properly view all your images. You'll most likely need to select all the previous selected images, and change the owner of the files to the web folder owner. Then you should be good to go!

The ELGG Themes Pluigins show This plugin is invalid: The required file "start.php" is missing. error

Hi I'm new to Elgg framework i'm looking for change the themes of the my site, i have used sea themes,pab_theme,puritythree_theme, and i was open the pluigins in admin page, i can't activated the themes
seatheme
This plugin is invalid: The required file "start.php" is missing.
Check the Elgg documentation for troubleshooting tips
the above message was show, so how can i will change the themes
Every plugin (and themes are plugins) needs to have a start.php file in the root of the plugin's directory. So the path should look something like:
Elgg/mod/seatheme/start.php
The theme needs to reside in the mod dir, and it must have a start file. If, for some reason it doesn't, then you would get that error.
Are you really trying to load three themes? Generally people only load one. I don't think that this is the cause of the error though.
It would be good if you spent some time with the Elgg documentation, specifically: http://docs.elgg.org/wiki/Themes
I had the same problem but I found the solution. You have to download the zip file of the theme, unzip the file, open the file and if you find another file inside you must send that file to the mod file. Basically the directory would be Theme->Theme-> The rest of the files with start.php in it.
So you would have to send the second folder to the mod folder.

Cant Upload, Update, Install Plugins After cloning wordpress with backupbuddy

I've just migrated a client site to her production server using the latest version of BackupBuddy v3.0.40, and at first glance everything looks dandy, but on closer inspection, most WP file functions are borked: update wp, upload images, upload plugin.
I've done this a ton of times (several times on this host), and don't know why its not working here
I suspect it has to do with the tmp directory, but i can't see a problem..
another possibility is that a script (installatron via cpanel maybe interfering.. i notice that there are upload folders created for all months up to 2016! i read about this being a solution to permissions issues in WP's past)
This is what I've tried:
changing the wp-media upload location to the default, changing the 'store in year/month' setting and general wiggling. this was imported as '/home/###/public_html/wp-content/uploads' which looks correct, but unnecessary, the default is wp-content/uploads. neither work.
changing the permissions on wp-content and uploads dir to 777 (not all contents)
adding a line to wp-config.php:
define('WP_TEMP_DIR', ABSPATH . 'wp-content/'); no dice
uninstalled all traces of the installatron scripted wp installation (no files or db remain)
repeating the migration (same backup file, identical results)
confirming that:
i can create new posts, just not upload media
it works on the staging server (same host)
safe mode is off
apache is running as user, tx suPHP
the files were extracted by php via the browser
i've compared phpinfo to other working sites and dont notice anything out of the ordinary
hope you can shed some light!
thanks, Tim
image upload error:
“envelope-9887.jpg” has failed to upload due to an error
The uploaded file could not be moved to /home/###/public_html/wp-content/uploads/2012/07.
wordpress update error:
Download failed.: Destination directory for file streaming does not exist or is not writable.
plugin install error:
Download failed. Destination directory for file streaming does not exist or is not writable
sometimes when migrating you may have to look through the database options table and change a few entires, ie:
from the old site structure it could be: /home/yoursiteid/public_html/wp-content/ etc..
but on the new server the structure could have changed?
ie: /home/differentuserid/wwwroot/wp-content/
edit a file on the server to include :
echo getcwd() . "\n";
just to see if the home directory is the same as your current server or if its changed from your old sevrer, have a check in your database options table and update the entires which ref the old dir structure..
I found, eventually, that I'd overlook the line
define('WP_TEMP_DIR', 'old-hard-link-here');
which I believe was nestled directly under the wp salts, camoflaged to the tired eye! Simply removing that line and setting the media path to the default fixed the issue.
I believe that that line was installed by the cPanel script 'Installatron'.
Case closed

Resources