Increase PHP Upload Size Limitation

Every server running has limitations including file upload, If you need to upload bigger file, you need to adjust PHP settings. If you are running web server on Linux, mostly you can search the settings file on /etc/php5/apache2/php.ini if your web server running on Windows(xampp/wampp) mostly you’ll find it on \wamp\bin\php\php5.4.12\php.ini Just open that file with plain text editor. Do a search for upload_max_filesize and post_max_size

Here’s the end result for my setting’s file:

and

You need to reload / restart the Apache’s service after that.

Test the upload now.

How To, Linux, PHP, WordpressLeave a comment

Protecting Your WordPress Admin with htaccess

Everyone can easily guess how to enter your WordPress Admin Dashboard, yes by default it’s www.yoursite.com/wp-admin. Someone with evil-minded can easily target that login url using a brute-force software to try every username and password combination, that’s why we should never use a word based easy-guess password.

One of the basic protection is to use .htaccess, I’ll show you how to do it.

Creating .htpasswd

First of all, create locally a file named .htpasswd, then generate a username and encrypted password using .htpasswd generator. Copy the result and paste into your newly created file.

.htpasswd

Then upload the file into your server, you can put it somewhere inside or outside public_html folder. In me case I put it into /home/pupung/

Creating .htaccess

Next step is to create .htaccess file, create .htaccess file with the same way you did on .htaccess, here’s my code:

and upload it to wp-admin folder.

You can test it by visiting your admin URL yourdomain.com/wp-admin and you will be prompted by a dialog box requested username and password.

wp-admin

Protecting wp-login.php

One more thing to do is protecting wp-login.php which is reside inside your root instalation of WordPress. I use the code below to protect it, just add after your WordPress’ .htaccess lines.

Well done, now your wp-admin protected. Actually there are few more tricks how to protect your WordPress instalation, I’ll share it in another post. Thanks for reading.

Linux, Wordpress1 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