Wordpress temp folder under WP-Content - wordpress

At work we have something strange going on with our WordPress Website.
It creates temp folder with few files under WP-content folder.
One of the file is automatically getting bigger on size for no reason around 1GB a day( I keep deleting it)
I can't find what is creating this files.
Folder is like this temp_750d5f958f2e5b3db45305632919a5ed
I am not sure if this is word-press or plugin but it wont stop until it reach the server capacity.
Thanks for any advice

If you have no idea about which plugin or theme or injection does it:
Install this plugin https://wordpress.org/plugins/string-locator/
Search for string 'temp_' inside your filesystem.
You will find more than 10 results. The file which contains a string similar to "temp_<?php echo md5(...." is the one you are looking for.
or if you want to it in local PC:
Download your WP installation home directory to your local PC.
Install any Code Searcher software to your PC. (for Linux, Searchmonkey is recommended. For Mac and Windows you can try DocFetcher)
Search for string 'temp_' inside your filesystem.

Related

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.

Unreal file in Cpanel

I see an unknown tar file in cpanel file manager. The thing that is bothering me whether or not I delete this file.
Recently I found some malicious files in my wordpress website and the hosting provider sent me a message to look over the whole website. Can anyone tell me if this unreal file was responsible or not?
Unreal file
This is a unusual filename (with tar.gz). This isn't wordpress file also. I think is better to delete this file.
The file seems very odd and is not part of any installation.
It is also uploaded in your Home Directory - which no application does.
If you have not uploaded the folder yourself you should indeed delete it.
Afterwards it is nice to go through your access log files to see if there aren't any POST requests made to your website that seem odd.
You can also look through the file called .lastlogin in your cPanel's Home Directory - it contains all IP addresses that have accessed your cPanel account.

image editor in wordpress not working

my wordpress image editor is not showing image to crop. It shows the image in media library but when i click to edit image the image is not showing. The Image url it is showing is
wordpress/wp-admin/admin-ajax.php?action=imgedit-preview&_ajax_nonce=0b98ac9553&postid=415&rand=29813
If you still need the answer, this is because your server does not have the PHP5-GD library installed. You can install using putty like this:
sudo apt-get install php5-gd
If your server is managed, ask your hosting company to install it: http://php.net/manual/en/book.image.php
This should solve your problem:
Removed all blank lines and whitespaces in /wp-content/themes/name/functions.php + the including files.
Removed all blank lines and whitespaces in /wp-config.php
Check that php5-gd is installed.
Permissions changed to 777 for testing /wp-content/upload/ + sub folders
Removed closing ?> tags in /wp-content/themes/name/functions.php + the including files.
Turned off all plugins.
Rename your and changed to default theme.
So we were having the same issue you asked above and eventually found the issue. When you install PHP on a windows machine the PHP.ini file initially points uploads, errors, etc to the Windows/Temp file. In order for things to function correctly you have to change the IIS_IUSR security level to have at minimum Read/Write on that folder, we changed it to full control. For whatever quirky reason WordPress sets the file permission from the folder it originates from (i.e. the Windows/Temp folder) when it dumps it into the WP-Content/Uploads folder. Another quirky thing is on Window's servers anytime you shut down and restart the server all the folders in the Windows folder revert back to default security settings, meaning each time the server shuts down you have to go back to that Temp folder and reassign permissions for IIS_IUSR

Checking Wordpress core files

Is there a script or something that can check if all core files are installed properly. I am installing a Wordpress site on clients hosting, and for some reason around 100 files were not transferred due to the connection time out. Now I am moving them one by one, but still I would like to check somehow, once I am done, that all files transferred are there and their size is more than 0b.
Thanks.
Since you are using Filezilla, drag and drop all files again into the folder.
Then when the file exists message shows up, pick Overwrite if different size and check apply to current queue only. Then only the ones with different sizes (or the ones that weren't transferred) will be overwritten/updated.
There's an easier way:
If you have access to some kind of control panel like cPanel, you can make a .zip file and upload it only via Filezilla.
Then on cPanel, go to File Explorer and unzip from there. Will be faster and you just have to upload one file (rather than opening tons of connections and giving you timeout).
Or if you have shell access, you can login with your key using Terminal(mac) or Putty(win), browse the folder and run the unzip command.

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