In my wordpress site suddenly generated unknown file which name is Fxc393QU.html in that file only content Fxc393QU. I'm sure this is generated by any script.
I dont know how this happen but due to this query string URL no longer work.
One more thing is this file owner and group is root root
nobody create file without sudo command.
Is my worpdress site hacked ?
Please scan your site using this plugin: https://wordpress.org/plugins/wordfence/
Related
Okay so I have a Magento 2.4.5 project where I am facing some issues like images not loading up because they are being looked up inside pub/media/wysiwyg instead of media/wysiwyg. I have some wysiwyg images inside pub/media/wysiwyg/<some_image_directory>, however on the live site the directories and files are showing up as media/wysiwyg. How can I make sure that a separate pub/media/wysiwyg directory is created in the live site apart from the media directory that is already there such that the image loads up properly? We are using nginx which is opening up at 'pub' directory as the root where the media directory resides. Any help is appreciated.
I tried checking for the piece of code where the image is coming from in an attempt to see if the path can be changed programmatically by removing the 'pub/' part from the pub/media/wysiwyg/ for the live site. However, that is not something that can be done as that will change things project-wide, which might break other things. Hence that is not being done.
First, you need to make sure that you are running the site from the root folder i.e. public_html on the server.
Steps to reproduce:
1: Run the command to load content:
bin/magento setup:static-content:deploy -f
2: Next command: chmod -R 777 pub/*
3: Set the secure base media URL and unsecure media URL from Magento database which you recently created and find the table core_config_data and change the path value as:
web/secure/base_media_url => https://example.com/pub/media/
web/unsecure/base_media_url => https://example.com/pub/media/
Or from Magento Admin
Stores -> Settings: Configuration -> General -> Base Url's -> Base URL for User Media Files
and to
Stores -> Settings: Configuration -> General -> Base Url's (Secure) -> Base URL for User Media Files
Flush Cache
4: Might be missing .htaccess in your /pub/media/ folder.
5: Check your .htaccess file, if there's bad code.
Thanks
Okay so I figured out the issue.
I was running the website from the pub directory as I should however there was a third party plugin which had some hard-coded src set by the owner for images set as /pub/media/wysiwyg in the adminHtml since they were using an older version of Magento which used to place images inside /pub/media/wysiwyg instead.
So I just changed it to /media/wysiwyg over there and everything works as expected.
Tbh the whole issue was quite hacky as the owner seems to have put a script inside the third party module's description section in the adminHtml and is using hard-coded links such as this.
Thank you all for the comments. :)
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 :)
I want to do developments on my client's website but by making a clone of it. So, main website url is: http://website.com and the clone i am trying to create is: http://test.website.com.
So far i've done the following:
copied entire root directory into public_html/test dir (with folders config,field,FirePHPCore,fontyourface,includes,js,misc,modules,scripts,sites,styles and themes)
created a subdomain in cPanel for test.website.com
checked the file settings.php (inside sites/default folder) for $base_url but found it commented, so left it as it is unchanged.
copied db via phpMyAdmin and updated the new db details in settings.php (inside sites/default folder).
inside the table variable, two rows with the name securepages_basepath and securepages_basepath_ssl. Changed their values from http://website.com to http://test.website.com (using the variable_get and variable_set functions).
Now i can access http://test.website.com but when i click on login (from header) it takes me to http://website.com/user and if manually type http://test.website.com/user and login then it takes me to http://website.com/users/admin then i have to manually type in correct address http://test.website.com/users/admin.
And when i logout, it again takes me back to http://website.com.
So i want to know how can i completely make it to work on http://test.website.com?
Are there more variables to change?
And how i can make 100% sure that the test site is only using test and not the live site. I am afraid of messing up live website.
Please advice, thanks!
I fixed it by disabling the secure pages from inside the mysql database. It was inside variable table and securepages_enable field. It was in blob so i had to download the blob first and opened it in notepad and changed the value inside it from 1 to 0 and then uploaded it back by updating the securepages_enable field.
I had to do this because after logging in from my test url, the urls were redirecting back to the live website, so whatever change i was making, it was all affecting the live site.
Hope this helps to someone with similar case. Thanks!
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
I am copying my site The Sydney Visitor to the subdomain new.thesydneyvisitor.com. The reason is that i want to change the design while my old site is still active.
What I have done so far:
Copied all the files to the sub-domain directory using ftp.
Created a new database
Exported the old site database and imported it to the new database
Edited the wp-config file (in the subdomain directory) to point to the new database
Updated the wp-options table to reflect the url change
Run this query to update the URL change in the posts
UPDATE wp_posts SET guid = replace(guid,'http://www.thesydneyvisitor.com','http://www.new.thesydneyvisitor.com');
The problem:
After doing all these when I try accessing the site using the subdomain url I get the following errors:
Warning: require(/home/rapidtem/public_html/new/wp-includes/load.php) [function.require]: failed to open stream: No such file or directory in /home/rapidtem/public_html/new/wp-settings.php on line 21
Fatal error: require() [function.require]: Failed opening required '/home/rapidtem/public_html/new/wp-includes/load.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/rapidtem/public_html/new/wp-settings.php on line 21
Kindly assist. I am stuck.
Thanks in advance
Double check the following things.
Properly configured the sub-domain directory.
Copied all the wordpress files to the new directory. (I prefer zip the wordpress folder and upload to the new place to avoid any file loss)
Correct database names given in wp-config.php
The new directory has the read/write permissions (Check is it a password protected folder or not)
If everything above is fine, then the problem will be in your new database.
Instead of running a query to update the URL change in the posts do the following steps:
Goto wp-options table and edit the site_url ( at 1st row), home (around 39th row ) and upload_path ( atround 58th row).
Here is a detailed tutorial How to move wordpress to a new server or host.
There are some plugin available to do these search and replace in database. Check this one
Have you checked the referenced files exist in those locations?
Did you change the Home and Site URL from the Wordpress Database?