Almost 75 million websites use WordPress for their content management service. Out of around 120 plugins, it offers almost everything your website needs to operate in their domain of work. But a wise choice among all of it is required in order to reduce page load time when almost 7 to 10 seconds of attention is all you have. This list of seven wordpress plugins when optimally used will work out to be the best for your website:
This is something I’ve done already so many times, but just because I don’t do it every month, I forget it all the time. So, I thought I would make a reminder note to myself and anyone else who has similar problem :
The easiest way for me to import an sql file into a database in WAMP environment using command line is using follwoing:
1. Run the cmd (DOS) and get into the mysql folder, which in my case works like this[php toolbar=”false” classname=”one_line”] C:\>cd C:\wamp\bin\mysql\mysql5.0.51b\bin
Most of us have come across this error: “Fatal error: Allowed memory size of xxxxxx bytes exhausted (tried to allocate yyy bytes) in ….” in the php error logs.
In php, running out of memory in usually a sign that your php script is not too well written or has a bug or two in it; However sometimes even the best of our php scripts still require more memory than usual especially if it is handling large amounts of data.
Luckily in php, increasing the memory limit is an easy task to do and can be done in a number of ways.
People access your site aren’t always in the same timezone as you are. Now perhaps you would like to determine what the time is for a user in a different country. Then here is a quick way to find this information out.
This example is very useful if you simply want to fetch your clients date and time or timezone; but also good to see what time of day (their time, not server time) your clients access your website.
The way the below example works, is that the client will click a submit button which sets the value of the hidden input field to their local time stamp and that gets submitted to the same php script. Then the php script checks if that value has been sent and if it has, then it gets the local time (of the server) and takes the clients times and shows a message depicting the difference.
Below is a list of mime-types I come across most often. Suggest others that should be a part of the list by leaving a comment below. You can also view my article on finding the mime-type of a file by check out my article on PHP Function To Get File Mime Type.
PHP – text/html
HTML – text/html
HTM – text/html
CSS – text/css
Apache allows you to customize the server at the directory level, using .htaccess files. Below how to use them to serve custom 404 error (page not found), and other common error pages, to your users.
Alternately, You can place the 404 error template anywhere you want in a folder. For example you could place all error messages in a folder called “errormsg” refererring the 404 error to the url of the page.[php toolbar=”false” classname=”one_line”] ErrorDocument 404 /errormsg/404.php [/php]
Have you ever tried to post a link to your content on Facebook only to realize that an image is missing or the description isn’t there?
Naturally, you go back to your edit your article and add the missing content. Then you head back to Facebook and try to post the link. What, Facebook still isn’t showing the new content? Why? It is caching the Open Graph data!
In my experience this process has updated the Open Graph cache on Facebook every time.
Disclaimer: this is not a documented process by Facebook.
Learn more at http://opengraphprotocol.org/
It occurred to me that just maybe you don’t want to display your site with the www subdomain prefix. In that case you could deploy the following code in your .htaccess file to redirect www to non-www. By doing so, users will access your site at http://domain.com not http://www.domain.com.
If your website is hosted on an apache server, a redirect from www to non-www is a simple implementation. Add the following to your .htaccess file[php toolbar=”true” classname=”one_line”] RewriteEngine On
Add the above code to you .htaccess file and replace domain.com with your domain name.
This series of articles will focus on XML, its applications in modern day web development and how PHP fits into this niche. In this article, we will focus specifically on the tools provided to us by PHP which enable us to manipulate XML data sources.
What is XML and Why Use it?
XML (eXtensible Markup Language) is a W3C standard designed to allow the easy exchange, storage and use of data between web applications and services.