How to set posts redirect to a new domain

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:

Nginx Server

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

Reload or restart Nginx for the change to take effect.

 

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

Make Your Server To Update WordPress Seamlessly

If you have issue doing “one click” WordPress upgrade on your server. This might be usefull for you:

First of all, include your username to “www-data” group.

then, change group ownership of your www files to www-data

add capability to group to have write access

find and change directory permission to 775 (owner and group writeble)

give read and write access to user and group on files

Last step, open up your wp-config.php and add this following code at the top of the file.

Lets try to upgrade your WordPress update or plugins. Cheers.

How To, Linux, Wordpress, , Leave a comment

How to Enable Mod Rewrite Apache2 on Debian

I assume you have already Apache2 installed on your server. Enabling mod_rewrite is quite easy, run the following command:

Then, edit your virtual host configuration file in /etc/apache2/sites-available:

Then, restart Apache:

Done.

How To, Linux, , Leave a comment