WordPress Upload Limit

WordPress Upload Limit

WordPress’ new built-in media players make it a powerful platform for streaming video and audio. But you might notice that your WordPress install has a prohibitive maximum file size for uploads. If you want to know what your site’s upload limit is, you can visit Media -> Add New. Below the upload box you will see “Maximum upload file size” with a number next to it, in megabytes. This is how big your uploaded files can be. By default, this number ranges anywhere from 2MB to 128MB and dictates how big an uploaded file can be. If you find yourself on the smaller end of that scale, you may want to increase your upload limit to accommodate larger media files.
Unfortunately, there is not a one size fits all solution for increasing this limit. How you actually go about increasing the upload limit of your install depends on how your server is configured. In the end, you may have to try a few things before you find something that works. This article will step your through this configuration so that you can find the solution that works for you.
Most of the steps that follow require you to access your site via FTP. If you are unfamiliar with how FTP works, I’d recommend Kevin Muldoon’s guide to installing WordPress. It has a section on accessing your site via FTP.

Setting up a PHP Info File

Before you even start trying out different solutions, it can be useful to try and get some details about how PHP is configured on your site. Luckily, PHP has a simple function to help you do this. Create a new file in a text editor of your choice, and add this line of code to it:

php phpinfo();

Name the file “info.php” and save it. Then, FTP into the root directory of your server, where WordPress is installed, and drag in info.php. Next, visit “http://yoursite.com/info.php”, replacing “yoursite.com” with the actual URL of your live site. This will give you a full list of details about your PHP configuration.

PHP Info File
Pay special attention to the version of PHP you are running

There’s a lot here, but you can ignore most of it. The most important part of this file is which PHP version you are running. This will be shown in block letters at the top, for instance “PHP Version 5.4.16”. It’s most important to pay attention to the first number of your version. You will either be running a version of PHP 4 or PHP 5. Some of the tips outlined here will require you to know which version you are running, so take note of it.
There are three settings within the PHP info file that are relevant to your upload limit. You can search through the file to see what they are currently set to.

  • memory_limit – This defines how much memory is allocated to PHP. You will simply need to ensure that this number is as high or higher than the upload limit you want to set.
  • post_max_size – This defines the maximum size that is handled in a POST request. We will need to set this to our new upload limit.
  • upload_max_filesize – This defines the maximum size for file uploads. This will also be set to our new upload limit.

Now that we have a little bit of info about our PHP set-up, we can try a few different methods for increasing our file size limit.

Editing PHP.ini

If you Google around for ways to increase your upload limit in WordPress, you will probably stumble across a variety of answers. Most of these are workarounds, but the best way to increase the file upload size is to make changes to your server’s php.ini file. The php.ini file contains all of your PHP’s configuration details, and will let you change the values you saw on your PHP info page.

Note: Before you start making changes to your server’s configuration, you should make a backup of your site and database. If you find your php.ini file, you will also want to back this file up locally.

Depending on your web host, you may be able to edit this php.ini file directly. To find this file, FTP into your site, and go to the folder that your WordPress install is in. This usually exists in an “html” or “www” folder. What you will need to do is navigate via FTP to the absolute root directory. This will typically be one or two directories higher than where the WordPress files live.


All servers have a main php.ini file. This is a file that allows you to control the php settings. The main php.ini file controls the settings for the entire server. By placing a php.ini file within a folder, it will override the main server php.ini and allow you to customize settings for the files and folders under it.

Most of the time, editing a php.ini file at a more local level is sufficient, however there are times when you may want to alter the main php.in file to provide the setting change as a default to the entire server. This can only be done with the root access on VPS and dedicated servers. The instructions below walk you through how to do that.

      1. Step 1: Log into your server via SSH.
      2. Step 2: Use the following command to open the file for editing.
        nano /usr/local/lib/php.ini


      3. Step 3 : Activate the Find feature by pressing crtl+W and then entering desired setting. The interface will scroll to that setting. In our case, we searched for post_max_size.
      4. Step 4: Alter the setting to your desired configuration. We changed the post_max_size setting to 16M.
      5. Step 5: Save the changes by pressing crtl+O. You will be prompted for a filename, press Enter to keep the same name.
      6. Step 6: Exit the editor by pressing ctrl+X.
      7. Step 7: Exit your SSH Client.

Uploading your own PHP.ini

If you are unable to find your php.ini file, or if your web host does not give you access to it, you may be able to upload your own file to override the default settings. To do so, create a new file and open it up in your text editor. Then, paste in the following code:

upload_max_filesize = 64M
post_max_size = 64M
memory_limit = 64M
max_execution_time = 300

Once again, I am setting my upload limit to 64MB, but you can change this value to whatever you want.

Remember your PHP version above? If you are on PHP version 4, then save this file as “php.ini”. If you are on PHP version 5, then save this as “php5.ini”. If you do happen to be running version 5, and the above filename does not work for you, then you can rename it “php.ini” and upload it again.

Then, FTP into your site again, and find the root directory where your WordPress files live. Drag this file into this directory.

Once again, if you have the ability to restart your server you should, then clear your browser and site’s cache. To confirm whether or not this method worked, go to Media -> Add New and check to see if your maximum file size has increased.

Using .user.ini

If that method still isn’t working for you, you may have another option. This will only work if you are using a version of PHP 5. Otherwise, you can skip this section.

Create a new file, and this time call it “.user.ini”. In that file, paste the following code:

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

You can change the value of 64M to match your new desired upload limit. Save this file, and then drag it into the directory of your WordPress install using FTP. If you have the ability to restart your server, you should do so. The changes may take a bit to take effect, but go to Media -> Add New to confirm.

Trying .htaccess

If you’ve tried the php.ini solutions, and none of them worked, there may be a solution that lies in your htaccess file. In general, htaccess is used to configure an Apache server. However, it can also be used to change PHP values, if your PHP version is set up as an Apache module.

Before you edit your htaccess file, make sure you have a backup. Changing this has the ability to cause an Internal Server Error or a blank white screen, which can easily be removed by simply re-uploading your original htaccess file.

To access your file, go to the root directory of your WordPress install. Make sure that you’ve enabled your FTP client to view hidden files, then open up the file labeled “.htaccess” to edit. At the bottom of the file, paste in this code:

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

Then save this back to your server. Visit your site, and look for any errors. Then, you can go to Media -> Add New to see if your maximum upload size has taken effect. If you run into any problems, upload the backup htaccess file you saved locally.

WordPress Config File

If all else fails, there is one more trick you can try. This will require editing your WordPress files directly.

The first step is to FTP into your server, and drag your “wp-config.php” file, located in the root directory, so that you can edit locally. Open up the file, and at towards the bottom add the line:

define('WP_MEMORY_LIMIT', '64M');

Then upload this file back to the server.

The navigate to your active theme folder in “wp-content” and drag your “functions.php” file to your hard drive so you can edit it. Open it up, and at the very top, insert:

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

This may be able to edit your server’s php.ini file at runtime. Historically, this is the most effective solution. But on some older set-ups or shared servers, this can sometimes be effective. once again, clear your browser and site cache, and visit Media -> Add New to see if your new limit has taken effect.

Contacting your Web Host

If none of the above solutions work for you, the next step is to contact your web host. Tell them you want to increase the “memory_limit”, “upload_max_size” and “post_max_size” in your php.ini file. Most hosts will not have a problem doing this. If your hosting service will not let you, or are unresponsive, it may be time to find hosting elsewhere.

Increasing Upload Limit on MAMP

Sometimes, you are developing your site locally and you want to increase your limit there. If you are on a Mac, you may be using MAMP, a local server that gives you access to Apache, MySQL and PHP. In other words, everything you need to run WordPress.

Fortunately, you will have access to your php.ini file in MAMP, you just need to know where to find it. The first step is to go to to the “PHP info” section located on the MAMP homescreen, up at the top. From there, mark down your PHP version.

Once you know that, go to “/Applications/MAMP/bin/php/PHP_VERSION/conf”. In the “php” folder you will see a list of different PHP versions, so make sure you navigate to the version your system is currently running. From there, you can open up the “php.ini” file, and follow the instructions above. Ultimately, you are going to look through the file to change these four variables:

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

And you’ll be all set with a new upload limit in your local environment.

Increasing Upload Limit on WAMP

The Windows equivalent of MAMP is called WAMP. And like MAMP, you will have access to your php.ini file. To find it, go to “C:\WampDeveloper\Config\Php\php.ini” and open up the php.ini file. Make the changes outlined above, keeping your eye on the four variables that relate to the upload limit in WordPress.

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

After you change these parameters, the upload limit will be increased.

Finding Your Solution

Unfortunately, there are quite a few things that you may need to try before you can increase the upload limit on your WordPress install. I can’t guarantee that they will work, but hopefully one of these will. If they don’t, don’t hesitate to reach out to your web host for help. A good host will assist you quickly, and get you up and running in no time. PHP configuration is no simple task, but with the meda-rich abilities of WordPress, it may be necessary for you to do so.

Stupid Microsoft AutoUpdate for Mac

Stupid Microsoft AutoUpdate for Mac

How to Fix Microsoft Office AutoUpdate for Mac not working

I installed Office 2016 on Mac back in September, but I have not been able to update the suite since. Not a big deal, considering I have what needed to do with the suite. Yes, it’s a bad habit, since updating the suite also protects the system from security issues. What ultimately forced me to try and resolve the problem was that I wanted to get the new feature updates, such as the new Full-Screen view in Outlook 2016, reliability and performance upgrades.

Resolve Office 2016 AutoUpdate for Mac not Working

To download the latest updates for Office 2016, I needed to have AutoUpdate version 3.4 installed. Checking for Updates from the Help menu was not working. I even tried to download the update manually, but Microsoft’s Support page behaved unresponsive, even in alternative web browsers.

Office Update
It turns out the culprit was the DNS server Microsoft uses to connect to the public Internet. Either it’s a compatibility issue with the version of OS X Yosemite or Microsoft is not aware of the problem yet. The not so obvious solution I have found for this is to use Google’s public DNS address. Here is how you do it.

Launch System Preferences and go to Network > Advanced.

Office Update


Next click the DNS tab and then the Add (+) button at the bottom.

Office Update

Now enter the following addresses: and then click OK.

Office Update

Launch, any of the Office 2016 apps, then click Help > Check for Updates then click Install.

Office Update

That’s it! You should now be back in business and be able to download and install the updates.Office Update

This solution might not be for everyone, but it’s worth a shot if you’re having a similar problem. You can always try downloading the AutoUpdate 3.4 update manually first to see if that will work. If not, then you can give the DNS entries a try.

Remove Query Strings from Static Resources

Remove Query Strings from Static Resources

You might have come across this page after testing your website on Pingdom, GTmatrix, Google Page Speed Insights or YSlow OR when viewing your source code you see URL’s that look like this:

http://mydomian.com/wp-content/plugins/js/some_js?ver=4.2 or something to that effect.
They can be seen on images, CSS and JavaScript in most cases. Most plugins affix them to their URL’s but there is a problem with them.

In this tutorial, I’ll discuss, What are the Query Strings in WordPress code structure? Why you should Remove Query Strings from Static Resources? How you can Remove Query Strings and Increase your WordPress Website Speed? And Removing Query Strings from Static Resources will increase your web page speed or not? So let’s begin…

Page load time is an extremely essential aspect for a website or blog. It help you to deliver a satisfactory and effective user experience to your visitors. It also help you to get higher ranking in Google Search which results increase in overall traffic on your website. As Google already announced that page load time affect your search engine ranking. Caching of Static Resources like CSS and JavaScript plays an important role in page loading time. Query Strings prevents Caching of Static Resources on Proxy servers and on browsers. By Removing Query Strings from Static Resources you can enable caching of static resources and can achieve a significant improvement in page load speed with less page load time.

Firstly – it can give away your WordPress version. In most cases this isn’t a problem as you should be keeping up to date as WordPress releases regular security fixes. But if your running an older version of WordPress some people may pick up on that and exploit the vulnerabilities which will be widely known by that point.

Secondly – Most are not cached by some proxy caching servers. These include content delivery networks.

Removing these queries from static resources such as CSS and JavaScript is simpler than you think, as you know I hunt the web for solutions to your problems, so that you may benefit from the results. A faster web benefits everyone.

So how do we remove those query strings?
You will need to locate your themes functions.php files, copy and paste this code inside your functions.php

function remove_cssjs_ver( $src ) {
 if( strpos( $src, '?ver=' ) )
 $src = remove_query_arg( 'ver', $src );
 return $src;
add_filter( 'style_loader_src', 'remove_cssjs_ver', 10, 2 );
add_filter( 'script_loader_src', 'remove_cssjs_ver', 10, 2 );

Save your file then clear cache. Refresh your site with control f5 to clear your browser cache.

Again go back and view your source, there should be no more query strings on your CSS and JavaScript URL’s

Removing Query String from Static Resources like CSS & JavaScript is important, if you want to enable Caching of Static Resources on Proxy Servers and want to increase your website page loading speed.

Content Delivery Networks (CDN)

Content Delivery Networks (CDN)

A content delivery network (CDN) places files in different locations so that the person using your webpage can receive the nearest copy of it faster.
If you’re serious about speeding up your site and you’ve optimized the bejesus out of your site (smushed image, minified CSS and Javascript, set up a caching plugin…) it’s time to think about signing up to a content delivery network, or CDN.

A CDN will drastically reduce server lag by storing static resources on a network of fast loading servers. Choosing a CDN can be tricky since there are many options available. Finding the right one depends entirely on your needs and the popularity of your site.

If you are considering a CDN this page will help you out by showing the steps required and defining the terms used (which can be confusing). No matter what content delivery company you are looking into this page will help you out by giving you a more in depth look so you can make an informed decision.

What is a CDN and Why Use One?

A CDN (content delivery network) is a network of servers located in different parts of a country (or the globe) that stores files to be used by your website visitors.

The reason they exist is because there is a measurable amount of latency (waiting time) for a website user who is visiting a page that is hosted thousands of miles away. There are also routing issues that can occur when a user is seeing such a webpage. If someone in New York is using a webpage that is hosted in Los Angeles they are seeing a slower version of that webpage because of the above mentioned routing issues and sheer distance the files have to travel.

By having your files on several servers across a geographical area you can make sure the user is loading files that are near them, not all the way across the country or ocean.


Does your site need a CDN?

Content delivery networks are part of an overall website strategy, but they are not a first step to take when improving your site. It is important to ensure you are doing all the things you can do before taking on the cost and complication of a content delivery network.

I would honestly say that there is a set of priorities for most websites:

  1. Make your site amazing for your users
  2. Improve the pagespeed of your site
  3. Make your site mobile friendly
  4. Decide on if a CDN can further help

Some types of sites will almost always benefit from a CDN:

  • Sites streaming large video files
  • Sites which consist of mainly large media files like image sites
  • Sites which have known heavy traffic in different countries

Some sites almost never need a CDN:

  • Local business sites (restaurants, beauty parlors, etc.)
  • Sites that have their main traffic in one geographic area or region

Why are CDNs becoming so popular?

The real reason that so many businesses and webmasters are now using CDNs is because Google has started using pagespeed as a ranking factor. Content delivery networks however provide a faster experience for users, and that means happier users who buy more things and click more ads. An additional reason for CDN use is the explosion of tablet and mobile users who depend on speed more so than desktop users who have stabler internet connections.

CDNs are becoming a defacto part of a webmasters toolkit, and even if you don’t get one now you will probably have to do so later.

Content delivery network companies


Free Trial: If you use over 15TB a month you qualify for a free MaxCDN trial. This includes everything that comes with a MaxCDN enterprise account, including unlimited bandwidth, negotiable trial length, all features enabled, and one-on-one setup call.

Pricing: Basic Start Plan comes with 100BG bandwidth for two websites for $9 a month.

MaxCDN is a popular and well-known CDN that powers the likes of The Next Web, The Washington Times and WP Engine.

If you use W3 Total Cache, setting up MaxCDN is a piece of cake. Simply go to the plugin’s setting, enable the CDN function, select MaxCDN, and then go to the CDN tab and enter your CNAMEs and API credentials. MaxCDN will then serve up whatever you specify, including images, media, and JavaScript and CSS files.

An elegant control panel displays a CDN usage summary for your website, and you can also access information such as hourly breakdown, edge locations users, and your top 50 files.

The service has servers all over the world, including the US, UK, China and Australia, with more edge locations planned. In addition, MaxCDN has 53 peering partners in North America and Europe to minimize hopes between ISPs.


Free Trial: CloudFlare offers a basic free plan that includes fast site performance, board security protection and powerful stats about your visitors.

Pricing: Plans start at $20 per month for your first website and $5 per month for each subsequent website.

CloudFlare is another well-known CDN service. Unlike many CDNs, CloudFlare doesn’t charge for bandwidth usage on the basis that if your site suddenly gets popular or suffers an attack, you shouldn’t have to dread your bandwidth bill.

According to CloudFlare, on average a website using the CDN will load twice as fast, use 60 per cent less bandwidth, have 65 per cent fewer requests, and is more secure.

CloudFlare operates out of 28 data centers around the world and uses a technology called Anycast to route your visitors to the nearest data center.

Rackspace Cloud Files

Free Trial: No.

Pricing: Plans are pay-as-you-go and start at 10 cents for your first terabyte of storage and 12 cents for your first terabyte of CDN bandwidth.

Rackspace Cloud Files offers online object storage for files and media and uses Akamai, a third-party CDN, to deliver your files globally.

The service uses more than 200 global edge locations around the world so your users get content fact and from servers within their region. Cloud Files maintains three copies of each files, ensuring files are delivers fast and reliably.

Rackspace’s partnership with Akamai is significant. The CDN is one of the world’s largest distributed computing platforms, responsive for serving between 15 and 30 per cent of all web traffic. Some of the company’s customers have include Facebook and Twitter.


Free Trial: 30-day free trial.

Pricing: Plans start at $99 a month for 256GB bandwidth transfer and 1000MB storage.

CacheFly promises to deliver your static files (images, video, audio, CSS etc) at up to 10 times faster than other solutions. The company even guarantees 100 per cent network availability or your money back.

Microsoft, Adobe and Bank of America are just some of CacheFly’s clients.

While CacheFly has a solid reputation – and has clients who have stuck around since they started in 2002 – the only downside is that it’s one of the most expensive CDN options.

Amazon Web Services

Free Trial: The AWS Free Usage Tier includes 5GB of Amazon S3 storage, 20,000 get requests, 2000 put requests, and 15BG of data transfer out each month for up to 12 months.

Pricing: Amazon S3 storage starts at 3 cents per gigabyte for standard storage. Amazon CloudFront pricing starts at 12 cents per month for the first 10 terabytes, with separate pricing for regions outside the US.

Amazon offers a couple of services I’ll mention here. Amazon S3 is a budget-friendly storage solution designed to make web-scale computing easier for developers. Amazon CloudFront is a CDN that gives any developer access to the same highly scalable, reliable, secure and fast infrastructure that Amazon uses to run its own global network of websites.

While Amazon AWS has a reputation for reliability, it’s good to keep in mind that CloudFront is aimed at developers and not inexperienced users.


Free Trial: No.

Pricing: Plans are pay-as-you-go at a set price of 12 cents per gigabyte of CDN bandwidth or 15 cents per gigabyte of CDN SSL bandwidth.

SoftLayer, an IBM company, offers cloud infrastructure as a service from data centers and network points around the world. Its customers range from startups to global enterprises.

The company uses the EdgeCast CDN to provide 24 content delivery nodes around the world, in additions to SoftLayer’s 13 data centers and 17 extra network points of presence.

How hard are they to setup?

Any content delivery network you use requires some steps that can be frustrating. It isn’t a 5 minute thing (even if they say it is). I would dedicate a couple hours specifically to set yourself up and get things going. The time will be spent learning new terminology, checking things, and making sure your content is set up right.

Do I need a CDN if my customers are only in one country?

The quick answer is yes, especially if you are in a large country like the United States. The longer answer is that if your country is very small, and you are sure you only need to communicate with people in your country, then you might not need one. America is a good example of a large country where CDNs offer qualitative improvements to page speed, Liechtenstein (a country with only 70 square miles) is an example of a small country.

Leverage browser caching

Leverage browser caching

One of the most common suggestions on Google’s page speed test is Leverage browser caching. This means that for those resources the browser does not know how long to keep these file in its cache.

What is browser caching?

Every time a browser loads a webpage it has to download all the web files to properly display the page. This includes all the HTML, CSS, javascript and images.

Some pages might only consist of a few files and be small in size – maybe a couple of kilobytes. For others however there may be a lot of files, and these may add up to be several megabytes large. Twitter.com for example is 2mb+.

HTTP/S supports local caching of static resources by the browser. Some of the newest browsers use a heuristic to decide how long to cache all resources that don’t have explicit caching headers. Other older browsers may require that caching headers be set before they will fetch a resource from the cache; and some may never cache any resources sent over SSL.

So it is recommended that you explicitly set caching headers for all cacheable static resources like javascript, css files, mage files and other binary object files (media files, PDF’s, Flash, etc.). In general, HTML is not static, and shouldn’t be considered cache able.

To specify headers for these files we can adjust the .htaccess file (or httpd.conf). The .htaccess file should be created/edited in your root if you want to use the settings for your whole domain or you can place it in a directory you want these settings to be active. This is an example of what you could/should add:

<IfModule mod_expires.c>
  ExpiresActive on

# Perhaps better to whitelist expires rules? Perhaps.
  ExpiresDefault "access plus 1 month"

# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
  ExpiresByType text/cache-manifest "access plus 0 seconds"

# Your document html
  ExpiresByType text/html "access plus 0 seconds"

# Data
  ExpiresByType text/xml "access plus 0 seconds"
  ExpiresByType application/xml "access plus 0 seconds"
  ExpiresByType application/json "access plus 0 seconds"

# Feed
  ExpiresByType application/rss+xml "access plus 1 hour"
  ExpiresByType application/atom+xml "access plus 1 hour"

# Favicon (cannot be renamed)
  ExpiresByType image/x-icon "access plus 1 week"

# Media: images, video, audio
  ExpiresByType image/gif "access plus 1 month"
  ExpiresByType image/png "access plus 1 month"
  ExpiresByType image/jpg "access plus 1 month"
  ExpiresByType image/jpeg "access plus 1 month"
  ExpiresByType video/ogg "access plus 1 month"
  ExpiresByType audio/ogg "access plus 1 month"
  ExpiresByType video/mp4 "access plus 1 month"
  ExpiresByType video/webm "access plus 1 month"

# HTC files (css3pie)
  ExpiresByType text/x-component "access plus 1 month"

# Webfonts
  ExpiresByType application/x-font-ttf "access plus 1 month"
  ExpiresByType font/opentype "access plus 1 month"
  ExpiresByType application/x-font-woff "access plus 1 month"
  ExpiresByType image/svg+xml "access plus 1 month"
  ExpiresByType application/vnd.ms-fontobject "access plus 1 month"

# CSS and JavaScript
  ExpiresByType text/css "access plus 1 year"
  ExpiresByType application/javascript "access plus 1 year"

  <IfModule mod_headers.c>
    Header append Cache-Control "public"

How to set up a cookieless domain

How to set up a cookieless domain

One of the many techniques for optimizing a website for speed is to serve static content such as CSS, Javascript and image files from a cookieless domain. In this tutorial i’m going to cover what a cookieless domain is and how you can set one up so you can do it yourself and improve the performance or your own website(s).

What is a cookieless domain?

A cookieless domain is not a very complex concept. It’s actually a domain which does not set cookies. Since static files such as CSS, Javascript and images files have no user interaction they have no need for cookies to be set on them. This just increases the request size for the file and therefor slows down the loading of the webpage.

How to set up a cookieless domain

In order to set up a cookiesless domain a couple of steps need to be taken.

  1. Register a new domain name. This can be a root domain or subdomain. I prefer to register the subdomain ‘static’ for the website in question. So for example: http://static.banihani.net is my cookieless domain.
  2. Configure your DNS database with a CNAME record to your root domain. On this website that would be: http://www.banihani.net.
  3. Configure your web server to serve static content without cookies. This can be done through an .htaccess file.

1. Register a new domain name
In order to set up a cookieless domain you need a different domain name. This can be either a subdomain (static.wesleysmits.com) or a root domain(wsmits.com). In most cases no problems will occur when using a subdomain. Since this is free most of the time this is a better alternative for most people.

If you use your root domain instead of the www-version (example.com instead of www.example.com) then using a sub-domain as a cookieless domain won’t work. In this case you would need to use another root domain as a cookieless domain. Google for example uses http://gstatic.com as a cookieless domain.

Note: If you are using Google Adsense on your website this issue will also occur because Google Adsense sets cookies on the root domain and all sub-domains. This behaviour can not be overrideen.

2. Configure your DNS settings
You should set an A record from your cookieless domain to your website domain. This goes for both alternatives (Subdomain and Root domain). The recommendation on most tutorials i’ve found is to use a CNAME record. While this does the job it’s less effective because the DNS resolution of a CNAME takes another route of indirection by finding the domain that it’s being pointed to and then resolving that.

3. Configuring the web server to serve static content
Configuring your web server to serve static content without cookies is done with a faily simple piece of code that should be placed in the .htaccess file in the root of your domain.
Code snippet credit should go to K. Worthington

# Use Mod_deflate to compress static files

<filesmatch ".(js|css|ico|txt|htm|html|php)$"="">
SetOutputFilter DEFLATE
# Speed up caching
FileETag MTime Size

# Expires
ExpiresActive On
ExpiresDefault "access plus 366 days"

# Future Expires Headers

<filesmatch ".(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"="">
Header set Expires "Sat, 27 Dec 2014 23:59:59 GMT"

Once you’ve set up your cookieless domain just upload all of your static content there. This includes CSS, Javascript, Ico, text and image files.
Once you’ve done that just configure your actual domain to point all the links to retrieve the files to the static domain.

For example: Usually i might retrieve my CSS file like this:

<link rel="stylesheet" type="text/css" href="/css/main.css">

Now it would look like this.

<link rel="stylesheet" type="text/css" href="http://statics.banihani.net/css/main.css">
How to remove shortcut virus on flash drive

How to remove shortcut virus on flash drive

If you did not format your flash drive, then check whether the files are not in hidden mode. Follow the following steps.

    • Click here download the file “AutorunExterminator

    • Extract it –> Double-click on “AutorunExterminator” –> Plug your flash drive now.
      This will remove the autorun.inf files from your flash drive and also from your drives.

    • Click on “Windows Key + R ”  type cmd and click on OK

      . CMD

    • Here I assume your flash drive letter as F: Enter this command.attrib -h -r -s /s /d f:\*.*


      You can copy the above command –> Right-click in the Command Prompt and paste it.

      Note : Don’t forget to replace the letter F with your flash drive letter. Now press “Enter”.
    • After that, download the Malwarebytes’ Anti-Malware from the below link http://en.kioskea.net/download/download-105-malwarebytes-anti-malware
    • Update it –> Perform “Full Scan”
How to change the copyright ( footer) in Joomla

How to change the copyright ( footer) in Joomla

  1. Connect to your site via FTP
  2. Go to the core files >> Languages >> en-GB.mod_footer.ini || modify it there.
 FOOTER_LINE1=Copyright &#169; %date% %sitename%. All Rights Reserved.
 FOOTER_LINE2=<a href="http://www.joomla.org">Joomla!</a> is Free Software released under the <a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU/GPL License.</a>
 THIS MODULE SHOWS THE JOOMLA! COPYRIGHT INFORMATION=This Module shows the Joomla! Copyright information
How to change the maximum execution time for PHP scripts

How to change the maximum execution time for PHP scripts

This article describes how to change the maximum execution time for PHP scripts by using the max_execution_time directive in a php.ini file.

Using the max_execution_time directive

By default, the maximum execution time for PHP scripts is set to 30 seconds. If a script runs for longer than 30 seconds, PHP stops the script and reports an error. You can control the amount of time PHP allows scripts to run by changing the max_execution_time directive in your php.ini file.

To change the maximum execution time, use a text editor to modify the max_execution_time directive in your php.ini file. For example, to set the maximum execution time to 40 seconds, use the following setting:

max_execution_time = 40

The second method is to fix it by editing your .htaccess in the same directory as the executing script by include this line

php_value max_execution_time ?

Replace “?” with the with the value you need to replace it with.

php_value max_execution_time 259200
Phonegap fullscreen Android application

Phonegap fullscreen Android application

If You want to switch Your Android Phonegap application into fullscreen mode use following tutorial:

All you have to do is to edit your main Activity.java file and do the steps below:

  1.  Open Your main Activity.java in /src/ directory
  2.  Add “import android.view.WindowManager;
  3.  Add the code below, after “super.onCreate(savedInstanceState);” in the middle of that << and super.loadUrl

Final code of main Activity.java should be the same as the code on example below:

public class CordovaApp extends CordovaActivity
public void onCreate(Bundle savedInstanceState)
// fullsceen the app requestWindowFeature(Window.FEATURE_NO_TITLE);
// end of fullscreen app super.init();
// Set by <content src="index.html" /> in config.xml