{"id":18004,"date":"2024-05-23T17:04:26","date_gmt":"2024-05-23T17:04:26","guid":{"rendered":"https:\/\/hostvento.com\/kb\/web-hosting\/how-to-manage-your-hacked-wordpress-website\/"},"modified":"2024-06-17T05:40:49","modified_gmt":"2024-06-17T05:40:49","slug":"how-to-manage-your-hacked-wordpress-website","status":"publish","type":"docs","link":"https:\/\/www.hostvento.com\/kb\/docs\/hosting-faqs\/how-to-manage-your-hacked-wordpress-website\/","title":{"rendered":"How to Manage Your Hacked WordPress Website?"},"content":{"rendered":"\n<p>The most frequent WordPress hacking scenarios, how to recognize them, and several strategies to fix them are all covered in this post. For more help in such a circumstance, it is advised that you get in touch with a qualified web developer.<\/p>\n\n\n\n<p><strong>Note:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ensure that you take a backup of your website before making any changes. If you face any issues, contact our 24\/7 Live Support for assistance.<\/li>\n\n\n\n<li>To ensure that your WordPress website does not get hacked in the future, ensure to scan your hosting account with an antivirus, remove any malicious or suspicious files, and update all the themes and plugins of your website to their latest versions.<\/li>\n<\/ul>\n\n\n\n<p>Table of Contents<\/p>\n\n\n\n<p>1. Missing Default Files<\/p>\n\n\n\n<p>2. Use Wordfence Plugin<\/p>\n\n\n\n<p>3. Replace the Missing Files<\/p>\n\n\n\n<p>4. Replace All the Default WordPress Files<\/p>\n\n\n\n<p>5. Missing Theme or Plugin Files<\/p>\n\n\n\n<p>6. Malicious Redirects<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1WPHacked\">1. Missing Default Files<\/h3>\n\n\n\n<p>This issue often occurs due to a variety of factors but the most common one is when your installation files are infected with malicious code.<\/p>\n\n\n\n<p>If your WordPress default files get infected, you might get the below errors:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A blank page<\/li>\n\n\n\n<li>A 500 error page<\/li>\n\n\n\n<li>A page with the message: \u201cThis site is experiencing technical issues\u201d (If your WordPress version is 5.2.2 or further), etc.<\/li>\n<\/ul>\n\n\n\n<p>For resolving this issue, follow the instructions below:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Checking the error_log file of your website<\/strong><\/li>\n<\/ul>\n\n\n\n<p>For searching the exact cause of the issue on your website, check the error_log file. This file holds records of any critical website errors that have occurred.<\/p>\n\n\n\n<p>You can find this file in the root folder of the installation:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If your website\u2019s domain name is the&nbsp;<strong>main domain name<\/strong>, then its root folder is public_html. For checking this, go to your&nbsp;<strong>cPanel Account &gt;&gt; Files Manager<\/strong>&nbsp;menu.<\/li>\n\n\n\n<li>If your domain name is an addon, check its root folder in your&nbsp;<strong>cPanel account &gt;&gt; Addon domains<\/strong>&nbsp;menu. Simply click on the link in front of the domain name as shown below:<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/modify-addon-domain-min-1024x189.png\" alt=\"\" class=\"wp-image-10749\"\/><\/figure>\n<\/div>\n\n\n<p>Then you will be redirected to the root folder of the domain name.<\/p>\n\n\n\n<p>Here, you can search for the error_log file. If the file is present follow the below steps:<\/p>\n\n\n\n<p>1. Right-click on&nbsp;<strong>error_log file &gt;&gt;<\/strong>&nbsp;click on&nbsp;<strong>View<\/strong>&nbsp;to check it:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/error-logs-view-min.png\" alt=\"\" class=\"wp-image-10750\"\/><\/figure>\n<\/div>\n\n\n<p>2. In the error_log file, you might see this message:<strong>&nbsp;\u201cNo such file or directory in\u2026\u201d<\/strong>&nbsp;as well as the path to the missing file. This error represents that the file required for the actual work of the website is missing.<\/p>\n\n\n\n<p>For example, here there is one such file:<\/p>\n\n\n\n<p><strong>\/home\/cPuser\/public_html\/wp-settings.php<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/php-selector-error-min.png\" alt=\"\" class=\"wp-image-9382\"\/><\/figure>\n<\/div>\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Enabling display_errors PHP option<\/strong><\/li>\n<\/ul>\n\n\n\n<p>Suppose the error_log file is not present in the root folder of your website, it is possible to enable the display_errors PHP option via the Select PHP version menu in your cPanel account. When this option is enabled, you can see the error directly on your website.<\/p>\n\n\n\n<p><strong>Note:<\/strong>&nbsp;For avoiding website vulnerabilities, the display_errors option needs to be disabled after the issue is resolved.<\/p>\n\n\n\n<p>1. For enabling this option, log in to your&nbsp;<strong>cPanel account &gt;&gt;<\/strong>&nbsp;<strong>Select PHP Version<\/strong>&nbsp;&gt;&gt; click on<strong>&nbsp;Options<\/strong>:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/php-selector-options-min.png\" alt=\"\" class=\"wp-image-10754\"\/><\/figure>\n<\/div>\n\n\n<p>2. Then, tick the checkbox in front of the&nbsp;<strong>display_errors option<\/strong>:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/php-selector-display-errors1-min-806x1024.png\" alt=\"\" class=\"wp-image-10757\"\/><\/figure>\n<\/div>\n\n\n<p>3. In case the default files are missing, you will see one of the similar errors on your website:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/error-log-file1-min.jpg\" alt=\"\" class=\"wp-image-9368\"\/><\/figure>\n<\/div>\n\n\n<p>4. The above error represents that the default wp-settings.php file is missing.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2WPHacked\">2. Use Wordfence Plugin<\/h3>\n\n\n\n<p>If someone injects a malicious code in your blog\u2019s code, the Wordfence plugin helps you to find it. You simply need to install the plugin as below:<\/p>\n\n\n\n<p>Go to your WordPress blog dashboard, on the left-side menu click on&nbsp;<strong>Plugins &gt;&gt; Add New<\/strong>. Then search for&nbsp;<strong>Wordfence<\/strong>&nbsp;in the search box and click on&nbsp;<strong>Install<\/strong>&nbsp;button as shown below:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/wordfence-install-min-1024x409.png\" alt=\"\" class=\"wp-image-10758\"\/><\/figure>\n<\/div>\n\n\n<p>After the installation, click on the&nbsp;<strong>Activate<\/strong>&nbsp;button to activate the plugin.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/activate-min.png\" alt=\"\" class=\"wp-image-10759\"\/><\/figure>\n<\/div>\n\n\n<p>You can see the plugin in the list of&nbsp;<strong>Installed<\/strong>&nbsp;<strong>plugins<\/strong>&nbsp;once it gets activated.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/installed-plugin-list-min-1024x189.png\" alt=\"\" class=\"wp-image-10760\"\/><\/figure>\n<\/div>\n\n\n<p>Then from the left-side menu, click on&nbsp;<strong>Wordfence &gt;&gt; Scan<\/strong>. This will open the Scan dashboard. Here click on the button&nbsp;<strong>Start New Scan<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/scan-min-1024x547.png\" alt=\"\" class=\"wp-image-10761\"\/><\/figure>\n<\/div>\n\n\n<p>This will scan the blog for malicious code and display the results. If there is a malicious code inserted in your blog, you can identify it as below:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/wordfence-error-min-1024x328.png\" alt=\"\" class=\"wp-image-10762\"\/><\/figure>\n<\/div>\n\n\n<p><br>To resolve this issue, it is needed to just clean the code highlighted in red color.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3WPHacked\">3. Replace the Missing Files<\/h3>\n\n\n\n<p>The file structure of WordPress CMS is pretty straightforward and so it is easy to do the replacement in just a few steps. It is recommended to replace default files because it will help in fixing all files that are actually corrupted by the virus. Ensure that you do it cautiously because replacing some files and folders might lead to data loss.<\/p>\n\n\n\n<p><strong>Note:<\/strong>&nbsp;Ensure to take a backup of your website before making any changes. If you installed WordPress with the Softaculous Apps Installer, please follow the steps in this guide to create a backup.<\/p>\n\n\n\n<p>For replacing the missing WordPress files, follow the steps below:<\/p>\n\n\n\n<p>1. Log in to your&nbsp;<strong>cPanel Account &gt;&gt; Softaculous Apps Installer<\/strong>:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/softaculous-installer-min-1024x270.png\" alt=\"\" class=\"wp-image-10763\"\/><\/figure>\n<\/div>\n\n\n<p>2. Now create a new installation for your website in the subfolder. This can be done by clicking on the&nbsp;<strong>WordPress icon &gt;&gt; Install<\/strong>:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/wordpress-install-min-1024x541.png\" alt=\"\" class=\"wp-image-10765\"\/><\/figure>\n<\/div>\n\n\n<p>3. Then you will get redirected to the installation menu. Select your website from the drop-down menu and type the name of the subfolder within the&nbsp;<strong>In Directory<\/strong>&nbsp;field. For example, here we will use&nbsp;<strong>fix<\/strong>:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/wordpress-install-options-min-1024x492.png\" alt=\"\" class=\"wp-image-10766\"\/><\/figure>\n<\/div>\n\n\n<p><strong>Please Note:<\/strong>&nbsp;When you replace all the default files, it will automatically upgrade your installation to the version of the&nbsp;<strong>\u201cfix\u201d<\/strong>&nbsp;installation. In case the current version of your WordPress website is crucial or if you want to only replace some of the files, ensure to check the version of your website in&nbsp;<strong>\/wp-includes\/version.php<\/strong>&nbsp;file and create the installation of the same version. Don\u2019t mix the files of the different versions as it will most likely affect the functionality of your website:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/wordpress-version-min.png\" alt=\"\" class=\"wp-image-10767\"\/><\/figure>\n<\/div>\n\n\n<p>You can change the version for the new installation in the installation window:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/change-wordpress-version1-min-1024x419.png\" alt=\"\" class=\"wp-image-10769\"\/><\/figure>\n<\/div>\n\n\n<p>4. Scroll to the bottom of the page and click&nbsp;<strong>Install<\/strong>&nbsp;once you\u2019re done.<br>5. You will find your new installation files in the&nbsp;<strong>File Manager &gt;&gt;<\/strong>&nbsp;your domain name\u2019s root folder:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/fix-min.png\" alt=\"\" class=\"wp-image-10770\"\/><\/figure>\n<\/div>\n\n\n<p><br>6. Double-click on the folder to open it. For replacing only the missing file (e.g. wp-settings.php), first, find the file in the new installation folder:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/wp-settings-min-1024x461.jpg\" alt=\"\" class=\"wp-image-10771\"\/><\/figure>\n<\/div>\n\n\n<p><br>7. Shift this file to the root folder of your website that should be fixed. Right-click on the file&nbsp;<strong>&gt;&gt; Move &gt;&gt;<\/strong>&nbsp;type the path to your website\u2019s root folder&nbsp;<strong>&gt;&gt; Move File(s)<\/strong>. (Here it is public_html folder):<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/wp-settings-move-min-1024x220.png\" alt=\"\" class=\"wp-image-10772\"\/><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/move-files-window-1-min.jpg\" alt=\"\" class=\"wp-image-9376\"\/><\/figure>\n<\/div>\n\n\n<p><br>That\u2019s it! Now you have recovered the missing file and your website should be up.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"4WPHacked\">4. Replace All the Default WordPress Files<\/h3>\n\n\n\n<p>1. Log in to the<strong>&nbsp;cPanel Account &gt;&gt; Softaculous Apps Installer<\/strong>:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/softaculous-installer-min-1024x270.png\" alt=\"\" class=\"wp-image-10763\"\/><\/figure>\n<\/div>\n\n\n<p>2. In the subfolder, create a new installation for your website. For this, click on the<strong>&nbsp;WordPress icon &gt;&gt; Install<\/strong>:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/wordpress-install-min-1024x541.png\" alt=\"\" class=\"wp-image-10765\"\/><\/figure>\n<\/div>\n\n\n<p><br>3. Then you will be redirected to the installation menu. Select your website from the drop-down menu and type the subfolder\u2019s name within the&nbsp;<strong>In Directory<\/strong>&nbsp;field. Here it will be&nbsp;<strong>fix<\/strong>:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/wordpress-install-options-min-1024x492.png\" alt=\"\" class=\"wp-image-10766\"\/><\/figure>\n<\/div>\n\n\n<p><br><strong>Please Note:<\/strong>&nbsp;When you replace all the default files, it will automatically upgrade your installation to the version of the \u201cfix\u201d installation. In case the current version of your WordPress website is crucial or if you want to only replace some of the files, ensure to check the website\u2019s version in \/wp-includes\/version.php file and then create the installation of a similar version. Don\u2019t mix the files of the different versions as it will most likely affect the functionality of your website:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/wordpress-version-min.png\" alt=\"\" class=\"wp-image-10767\"\/><\/figure>\n<\/div>\n\n\n<p><br>You can change the version for the new installation in the installation window:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/change-wordpress-version1-min-1024x419.png\" alt=\"\" class=\"wp-image-10769\"\/><\/figure>\n<\/div>\n\n\n<p><br>4. Scroll to the bottom of the page and click&nbsp;<strong>Install<\/strong>&nbsp;once you\u2019re done.<br>5. You will find your new installation files in the&nbsp;<strong>File Manager &gt;&gt;<\/strong>&nbsp;your domain name\u2019s root folder:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/fix-min.png\" alt=\"\" class=\"wp-image-10770\"\/><\/figure>\n<\/div>\n\n\n<p><br>6. Remove the&nbsp;<strong>wp-config.php files, .htaccess, and wp-content folder<\/strong>&nbsp;of the newly-created installation. These files are responsible for the content and performance of your website:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/delete-wp-htaccess-min-1-1024x575.png\" alt=\"\" class=\"wp-image-10775\"\/><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/trash-1-min.jpg\" alt=\"\" class=\"wp-image-10777\"\/><\/figure>\n<\/div>\n\n\n<p><br>7. Shift the other files to the root folder of your website. For this, click&nbsp;<strong>Select All &gt;&gt; Move &gt;&gt;<\/strong>&nbsp;type the path to your website\u2019s root folder:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/select-move-min-1024x576.png\" alt=\"\" class=\"wp-image-10778\"\/><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/move-files-window-1-min.jpg\" alt=\"\" class=\"wp-image-10779\"\/><\/figure>\n<\/div>\n\n\n<p><br>That\u2019s it! You can now check your website.<\/p>\n\n\n\n<p>In case your website isn\u2019t working properly, please check the error_log again. Most likely the reason for this is missing files of a theme or plugin.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"5WPHacked\">5. Missing Theme or Plugin Files<\/h3>\n\n\n\n<p>This issue often occurs due to different factors and one of the most common is due to maliciously infected installation files.<\/p>\n\n\n\n<p>If your WordPress plugin files are missing, you might see the below errors:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A blank page<\/li>\n\n\n\n<li>A 500 error page<\/li>\n\n\n\n<li>A page displaying the message: \u201cThis site is experiencing technical issues\u201d (starting from 5.2.2 WordPress version), etc.<\/li>\n\n\n\n<li>A \u201cbroken\u201d page<\/li>\n<\/ul>\n\n\n\n<p>One of these errors can also be found in the error_log file or on your website:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">PHP Fatal error: Uncaught Error: Call to undefined function sample_function() in \/home\/cPaneluser\/public_html\/wp-content\/themes\n\/sampletheme\/header.php:8<\/pre>\n\n\n\n<p>For example, a broken plugin error looks as below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">PHP Warning: require(\/home\/cPaneluser\/public_html\/wp-content\/plugins\/woocommerce\/includes\/wc-account-functions.php): failed to open \nstream: No such file or directory in \/home\/cPaneluser\/public_html\/wp-content\/plugins\/woocommerce\/includes\/wc-core-functions.php \non line 26\n\nPHP Fatal error: require(): Failed opening required '\/home\/cPaneluser\/public_html\/wp-content\/plugins\/woocommerce\/includes\/wc-account\n-functions.php' (include_path='.:\/opt\/alt\/php72\/usr\/share\/pear') in \/home\/cPaneluser\/public_html\/wp-content\/plugins\/woocommerce\n\/includes\/wc-core-functions.php on line 26<\/pre>\n\n\n\n<p>This error indicates that the file required for the plugin to work is missing:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/missing-theme-plugin-error-min.jpg\" alt=\"\" class=\"wp-image-9406\"\/><\/figure>\n<\/div>\n\n\n<p>For replacing the missing file, you will need to re-install the affected theme or plugin.<\/p>\n\n\n\n<p><strong>Note:<\/strong>&nbsp;The wp-vcd.php virus is the main cause of the absence of the functions.php file in your website\u2019s theme which you can find it the \/wp-includes folder.<\/p>\n\n\n\n<p>To verify if the newly-installed theme isn\u2019t affected, remove the file in advance if it is present or replace all the default installation files to be safe.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"6WPHacked\">6. Malicious Redirects<\/h3>\n\n\n\n<p>When your website is affected by the virus, it may start redirecting to malicious pages:<\/p>\n\n\n\n<p><strong>Note:<\/strong>&nbsp;If you don\u2019t want a virus to enter your PC, avoid clicking on any website links you are redirected to.<\/p>\n\n\n\n<p>Mostly a non-secure theme or plugin is the reason behind such an issue and this enables them to modify database URLs and the files of your website.<\/p>\n\n\n\n<p>The solution to this issue is as listed below:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/malicious-error-min-1024x669.jpg\" alt=\"\" class=\"wp-image-10783\"\/><\/figure>\n<\/div>\n\n\n<p><br>1. Search your database name in the<strong>&nbsp;wp-config.php<\/strong>&nbsp;file. Navigate to&nbsp;<strong>cPanel &gt;&gt; Databases section &gt;&gt; phpMyAdmin<\/strong>&nbsp;menu:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/phpmyadmin-min-1024x106.png\" alt=\"\" class=\"wp-image-10784\"\/><\/figure>\n<\/div>\n\n\n<p><br>2. Click on&nbsp;<strong>+<\/strong>&nbsp;icon next to your cPanel username to check the list of the databases, find the database for your WordPress website, and click on it. Then, select<strong>&nbsp;wp_options<\/strong>&nbsp;table (<strong>wp_<\/strong>&nbsp;is the database prefix and it can vary for your installation):<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/wp-options-1-min-1024x179.jpg\" alt=\"\" class=\"wp-image-10787\"\/><\/figure>\n<\/div>\n\n\n<p><br>3. In the&nbsp;<strong>option_value<\/strong>&nbsp;fields, verify the values of siteurl and home rows:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/options-details-1-min.jpg\" alt=\"\" class=\"wp-image-10788\"\/><\/figure>\n<\/div>\n\n\n<p><br>4. Replace the incorrect fields using your actual domain name.<br>5. Find similar links in your database and replace them by following this guide.<br>6. Replace the<strong>&nbsp;.htaccess<\/strong>&nbsp;file of your website temporarily with the default one. You can&nbsp;<strong>rename the existing one<\/strong>&nbsp;and create a&nbsp;<strong>new .htaccess<\/strong>&nbsp;file.<br>For renaming the existing one, double-click on the file, rename it and click&nbsp;<strong>Enter<\/strong>&nbsp;to save. To create a new one, click&nbsp;<strong>+File &gt;&gt;<\/strong>&nbsp;type<strong>&nbsp;.htaccess &gt;&gt;<\/strong>&nbsp;<strong>Create New File<\/strong>:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/11\/htaccess-old-1-min-1024x291.jpg\" alt=\"\" class=\"wp-image-10789\"\/><\/figure>\n<\/div>\n\n\n<p><br>After doing this, right-click on the newly-created file&nbsp;<strong>&gt;&gt; Edit &gt;&gt;<\/strong>&nbsp;paste the rule below<strong>&nbsp;&gt;&gt;<\/strong>&nbsp;click&nbsp;<strong>Save Changes<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># BEGIN WordPress\nRewriteEngine On\nRewriteBase \/\nRewriteRule ^index\\.php$ - [L]\nRewriteCond %{REQUEST_FILENAME} !-f\nRewriteCond %{REQUEST_FILENAME} !-d\nRewriteRule . \/index.php [L]\n# END WordPress<\/pre>\n\n\n\n<p>If your website is still redirecting, try replacing the default files.<\/p>\n\n\n\n<p>Temporarily disabling all the plugins might also help. In case one of them is causing the redirect, enable them one-by-one to find which one is causing this issue.<\/p>\n\n\n\n<p>That\u2019s it!<\/p>\n\n\n\n<p>Hope all these solutions will help you to bring your WordPress website back to normal.<\/p>\n\n\n\n<p><a href=\"https:\/\/hostvento.com\/kb\/web-hosting\/how-to-set-woocommerce-email-notifications\/\" target=\"_blank\" rel=\"noopener\"><strong>How To Set WooCommerce Email Notifications?<\/strong><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The most frequent WordPress hacking scenarios, how to recognize them, and several strategies to fix them are all covered in this post. For more help in such a circumstance, it is advised that you get in touch with a qualified web developer. Note: Table of Contents 1. Missing Default Files 2. Use Wordfence Plugin 3. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":23377,"menu_order":1173,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-18004","docs","type-docs","status-publish","hentry","no-post-thumbnail"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs\/18004","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/comments?post=18004"}],"version-history":[{"count":2,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs\/18004\/revisions"}],"predecessor-version":[{"id":20760,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs\/18004\/revisions\/20760"}],"up":[{"embeddable":true,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs\/23377"}],"wp:attachment":[{"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/media?parent=18004"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/doc_tag?post=18004"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}