How To Update PHP 7.0 to PHP 7.2 on Debian Easily

Linux, PHPLeave a comment

More than a year a go, I wrote about how to upgrade PHP 5.6 to PHP 7.0.

Now, PHP 7.0 will reached the end of its critical support through December 2018. After that date PHP community will no longer provides support for bugs. Following to PHP 7.0, PHP 7.1 will be put under discontinued support next year.

Also, since dotdeb dropped support for PHP 7.1 and later so we will use another package provided by Ondřej Surý’s. Continue reading “How To Update PHP 7.0 to PHP 7.2 on Debian Easily”

How to set posts redirect to a new domain

Linux, snippet, Uncategorized, Wordpress, , , , , Leave a comment

I’m moving out a blog to a new domain, and redirect all posts specifically to a new domain.

http://olddomain.com/category/postname

should go to

http://newdomain.com/category/postname

Apache Server

On Apache that allows .htaccess, you can add this line on top of the file:

RewriteEngine on
RewriteRule ^(.*)$ http://www.newsite.COM/$1 [R=301,L]

Nginx Server

On Nginx, add this line on server block configuration file:

server {
return 301 http://newdomain.com$request_uri;
}

Reload or restart Nginx for the change to take effect.

 

What You Have Todo if a Brute Force Attacking Your WordPress Sites

How To, Linux, WordpressLeave a comment

One of my server had cpu outage last week because of a script repeating to access wp-login.php file with hundreds of request per minute.

if you do tail -f access.log it will return repeating requests
[shell]
146.0.79.23 – – [22/Aug/09:31:14:11 +0000] “GET /wp-login.php HTTP/1.1” 200 3327 “-” “Mozilla/4.0”
[/shell]

I will share my steps to recover it;
Continue reading “What You Have Todo if a Brute Force Attacking Your WordPress Sites”