05/30/14

Increasing Max File Uploads for WordPress (Media Uploads)

You are blogging, your mind set on crunching all of those ideas wandering in your head, after finishing your final draft, you attempt to add pictures, videos but you get stopped by this.

wp-go-jaren-upload-new-media

Your maximum upload file size set to 1MB which for me works fine, but in case I need to upload a MP3, or a video file that would be a problem. As we know by default, most shared servers allow up to 8 or 16 MB. There’s no reason to upload an image greater than 1 – 2 MB in size. But some of still want to be bad and bend/break the rules to our advantage.

There are a couple of ways to achieve this:

 

  • Functions.php – On WP-admin dashboard, go to Themes > Editor then look for Theme Functions (functions.php)
    • @ini_set( ‘upload_max_size’ , ’32M’ );
    • @ini_set( ‘post_max_size’, ’32M’);
    • @ini_set( ‘max_execution_time’, ‘300’ );
  • .htaccess (you can check out my recent post on .htaccess modification)
    • php_value upload_max_filesize 32M
    • php_value post_max_size 32M
    • php_value max_execution_time 300
    • php_value max_input_time 300
  • PHP.INI – either you create or edit a PHP.INI file

If you are on a shared host, a php.ini file may not be in your directory. If that’s the case then we need to create a file called php.ini and upload it in the root folder. In that file add the following code:

    • upload_max_filesize = 32M (you can try 200M, even more like 1024m which is overkill)
    • post_max_size = 32M
    • max_execution_time = 300 (maximum time in seconds a script is allowed)

Keep in mind that file upload is not set by WordPress that’s why some would have a default size of 2MB, 8MB even 64MB it’s set by your webhost

You may also want to create/upload a PHPINFO.PHP file to check, to do that create a file named PHPINFO.PHP and add the following lines of code

<?php

echo phpinfo();

Save the file. upload to the directory you have your WordPress installed.  Call the script from your browser.

yourwebsite.com/phpinfo.php

 

Enhanced by Zemanta
05/27/14

WordPress Default .htaccess file

Knowing your .htaccess file is vital as with the .htaccess file you can do tons of stuff to your WordPress blog.  If you have a habit of trying out new plugins, installing them, removing them, etc. you also have to be aware that a corrupted .htaccess file can bring your site down due to plugins and other things. Knowing what to do and how to fix the .htaccess file can save a lot of face rolling and hair pulling.

 

Let’s start with your default WordPress .htaccess file

Root

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress

Subfolder

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /subdirectory/
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /subdirectory/index.php [L]
</IfModule>
# END WordPress

For .htaccess modifications always make a backup copy so if ever you mess up you can always load a fresh copy and start again.

To start modifying your .htaccess you need to locate your .htaccess file with these tools:

  1. cPanel‘s File Manager (inline code editor)
  2. FTP Client with a text editor – at default setting the files are hidden, set your FTP client to show hidden files. I use Filezilla and have it set, so that everytime I right click on the .htaccess file it would download the file and open it up in Notepad++ after doing my modifications and saving it, Filezilla will prompt you to either discard local file and/or finish editing
  3. WordPress PluginWP Htaccess Editor – I haven’t tried this but this is probably what I’m going to install next, if I’m planning more .htaccess mods.

Finding the location of the .htaccess file

The .htaccess file for WordPress should be in the folder where you installed WordPress. In the root folder, if you installed WordPress in the root directory or it could in a subfolder if you installed WordPress in a sub folder (/wp, /blog, /other, etc.).

yourwebsite.com/.htaccess
yourwebsite.com/wordpress installation/.htaccess

 

Enhanced by Zemanta
05/25/14

Cracking Down on SPAM

 

Cracking down on SPAM, I left this blog alone for quite some time, due to my recent attack where my blogs where defaced and my cPanel details got compromised so we had to start from a backup that wasn’t compromised. After loading a backup, I saved on my computer which was dated Feb 1st. I lost a couple of posts/articles all to thanks to those hackers and spammers.

SPAM

SPAM (Photo credit: AJC1)

I retired my D3 blog because of these SPAM comments, messages.

A couple of things I did for more added security.

  1. Removed Contact Form and replaced it with Contact Form 7
  2. Added reCaptcha Plugin for CF7
  3. Installed Bad Behavior

There’s no guarantee that I can stop Spam 100%, but it should give me a fighting chance, a spambot would be stopped immediately by these countermeasures. A human spammer may still be able to get through to my defenses, but I’m not going to give up without a fight.

I also modified my .htaccess for protection, also my wp-config.php and /wp-content.

  • Securing your .htaccess – since the .htaccess is one of the most important file on your website. Naturally protecting it is one of the most vital things to do. With this simple code you can stop hackers from accessing your .htaccess file.

<files ~ “^.*\.([Hh][Tt][Aa])”>
order allow,deny
deny from all
satisfy all
</files>

 

  • WP-Config.php – If you’re running WordPress like me then the next important file is wp-config.php, because this config file contains the login information, and other useful bits of info. For more detailed Info : Hardening WordPress

<files wp-config.php>
order allow,deny
deny from all
</files>

  • Protect the /Wp-Content folder – The wp-content folder/directory another important area in your WordPress website.  Why? This is is where your themes, plugins, images, videos, and cached files are located. Securing this folder is also a priority. This is also a main target of hackers, having access to this folder means they upload a script to suit their purpose. For this to work create a new .htaccess inside your /wp-content directory/folder. Got the inspiration from a post on Creative Bloq – Protect WordPress sites with .htaccess

Order deny,allow
Deny from all
<Files ~ “.(xml|css|jpe?g|png|gif|js)$”>
Allow from all
</Files>

 

More on .HTACCESS

 

Enhanced by Zemanta
01/25/14

Making Money Online is Hard

Making money off the internet is not easy at it seems. There are a lot of sites/people out there, telling us that it is very easy to make money off the internet.

1. Blogging

I heard people saying that making money blogging is very easy, “If you want easy money just make a blog, post an article put Google ads and get paid!” I try to explain to them that although it is the basic concept of earning through blogging, a lot of people I know tend to forget the real aspects of blogging and why you need to post articles, do research, post relevant information, SEO, Ad placement, blah,blahs, the kitchen sink, the works after that blogging doesn’t seem very easy at all. It’s more harder if you explain the details. What they don’t know or not aware is that you have to write articles that people want to read first, do research on the next post, and stick to the blog format, blog posting schedule and do it daily or weekly. Sure, it’s hard work but then again all jobs, require you to work hard if you want to reap big rewards later. Blogging is not a get-rich quick scheme, it’s a result of hardwork, dedication, perseverance and the love of sharing/giving information to those that need them.

There’s a couple of things that I always tell people if they want to pursue bloggging, they have to find their center, write what they love about and stick to it.

If you build it, they will come.(Kevin Costner and Field of Dreams springs to mind) True but there are still other thing you need to consider when monetizing your blog.

But making money is not a straightforward thing; nor is it easy. Hard work and patience are involved. You also need to work smartly and strategically.
Starting a blog just like that in a random niche, posting rehashed content or pointless content will never get you there.

The Truth about blogging is that everyone claims they know how to do it better, yes there are certain guidelines that you have to follow to be successful in blogging.

Yes, It’s all about hardwork not just copy and paste, you also have to think smart, strategize and not steal other people’s content and passing it as your own.

2. Ads, Affiliate Marketing, Internet Marketing, Referral Marketing, Site Monetization, Link Shortening Services

This is it! ways to make money of your blog, our most favorite topic but very hard to achieve. HOWS and WHYS start flying and racing in your mind. You can’t just make an article then put ads and expect to win big. No it’s about that. We missed the crucial part, relevant, original information/post. Well copy/pasted articles will get you nowhere fast, plus an imminent ban from ad sites like Google Adsense and Yahoo Publishers Network. There are tons of sites that offer blog monetization but they also have a criteria for accepting/rejecting your blog for monetization. Though most of these won’t get you millions quick with patience it should get you going. Nobody went rich overnight unless you basically stole the money. you can go either way part-time or full-time without proper motivation it won’t get you anywhere.

To name a few that can help you start in your blog monetization frenzy here’s my list :

  1. Google Adsense
  2. Youtube
  3. Chitika
  4. Amazon Associates
  5. Adf.ly

You can also register your blog and do some posts, advertise other sites on your blog – rent your blog space for ads

  1. Payperpost
  2. Blogsvertise
  3. Payu2blog

Refer others so you can benefit from them too! like

  1. Paypalback then there was also a refer-a-friend for Paypal
  2. Xoom’s Refer a Friend which both of you can earn $15 eGiftCard, if they sign up. :)
  3. adf.ly

PTC (paid to click) sites, Typing, Data-Entry, Work From Home, Translation services

There a lot of sites that promise you can make up to $100 even $500, but you also have to double check the credibility of these sites. Most sites are scams, most of them ask you to refer others so you can “cash in” your earnings. Some ask you to “buy” referrals so you can earn more. I tried some of these PTC sites and even checked out some of the typing jobs (or like some captcha typing jobs) with PTC sites being free, and you just have to stay on a certain page ofr like 10-15 secs and you get $0.001- 0.0001 cent per ad, unless you can browse them for 5-6 hours a day it won’t make much difference you spend more with electricity / internet connection than you earn. Not a valid option for living off the internet. But if you think of it, Making money with PTC sites may get you a couple of additional bucks, but don’t bet on it to supplement your income.

 Some Articles I’ve read and found interesting

Enhanced by Zemanta