If wordpress site is hacked then how to fix issue

Recently one of my wordpress site is hacked which is on wordpress. There is something wrong happening on server. We fixed issue with some steps, we given full steps for fixing issue. Due to disk I/O notification and CPU usages notification email I got to know.

If wordpress site is hacked then how to fix issue

There is something wrong happening on server.

First thing I did which is checking the apache access logs and error logs. I was getting per second 100 request from some IP addresses.

I stoped apache server and I took my database and filesystem backup. Deleted my admin username and added new administrator with new username.

You should use the Better WP Security wordpress plugin. This is very useful plugin.

iThemes Security (formerly Better WP Security)

I added following code in my .htaccess file

 # BLOCK BAD IPS
 <limit GET POST PUT>
 Order Allow,Deny
 Allow from all
 # uncomment/edit/repeat next line to block IPs
 # Deny from 123.456.789
 Deny from 192.111.152.122
 Deny from 192.111.144.233
 Deny from 110.85.90.123
 </limit>

If wordpress site is hacked then how to fix issue
If wordpress site is hacked then how to fix issue

But above code was still not helpful to me because disk I/O and apache process was taking time to sending the request to 403.

Then I blocked the IP Address on My Linux server using following commands.

 iptables -A INPUT -s 192.111.144.789 -j DROP
 iptables -A INPUT -s 192.111.152.122 -j DROP
 iptables -A INPUT -s 192.119.144.123 -j DROP

This solved my issue.

how to install wordpress on linux web server

WordPress tutorial, how to install wordpress on linux web server. Through Cpanal or downloading the zip from wordpress site and doing normal installation. But some times If you have VPS or your own linux server then you want to know about how to do the wordpress installation easily on Linux box.

how to install wordpress on linux web server

 

how to install wordpress on linux web server
how to install wordpress on linux web server

Just follow My steps:

If you have shell access to your web server, and are comfortable using console-based tools, you may wish to download WordPress directly to your web server using wget (or lynx or another console-based web browser) if you want to avoid FTPing:

  • wget http://wordpress.org/latest.tar.gz
  • Then unzip the package using:
    tar -xzvf latest.tar.gz

The WordPress package will extract into a folder called wordpress in the same directory that you downloaded latest.tar.gz.

Then Use the following Command.

#mv WORDPRESS YOURDOMAIN NAME

Than Open your apache configuration file and put following code in that file


<VirtualHost&nbsp; *:80>

ServerAdmin support@purabtech.in

DocumentRoot /var/www/html/YOURDOMAIN NAME

ServerName example.com

ServerAlias www.example.com

ErrorLog logs/YOURDOMAIN-error_log

CustomLog logs/YOURDOMAIN-access_log custom

</VirtualHost>

Than restart the apache server.

#/etc/init.d/httpd restart

Open your site in browser and do the installtion. But dont forget to create mysql database put correct information in wp-config.php file about database and username and password.

You are ready to go with your wordpress instillation with linux command prompt. This way you can do the local installation of wordpress on linux box.