Quick Tip: Non Cascading php.ini Values? Fix it Quick

We have all seen it. We have all done it. We have a WordPress site that doesn't listen to php.ini. We need to increase the max execution time or increase the PHP memory limit. We change a server's PHP settings using php.ini and test with <?php php_info() ?>. Low and behold, the settings don't take. We put php.ini in different locations and click a dozen links in search engines that promise solutions. Nothing works. The server still doesn't behave so we give up. You're wait is over.. probably.. if you're using suPHP One cause of PHP settings not taking affect is that the server is not … [Read more...]

HTACCESS: Like for Like URL Redirect

When a site is moved to a new location it is important to 301 redirect anyone who happens upon the old pages to the new pages. This helps both visitors and search engines. Redirection works best when visitors are sent from old URLs to new URLs in one-to-one fashion. For example, the like for like detour from example.com/page-one to example-two.com/page-one. There's no need to use scripts to map sites and make millions of "Redirect 301" directives for htaccess files. Provided there is no change in page directory structure we can use a few simple lines to direct traffic from one domain to … [Read more...]

Missing Apache2 Module mod_env in Ubuntu? Follow This…

So easy to fix but hard to find the solution. Hope this helps all you who are stuck with this. If your Apache server doesn't start and you get an error message like this: [crayon-5350b8994f818572645169/] It means you need to enable Apache module mod_env. A simple check for the module with sudo a2enmod at the command line might show the following available modules: [crayon-5350b8994f82d870776799/] Tell me if you can spot mod_env. I couldn't and a 30 minute journey through Google couldn't show me how to install mod_env.so. I eventually found a German forum where someone used  'a2enmod … [Read more...]

How to Change the Name of index.php in WordPress

They say it can't be done. Read support requests in the WordPress forum and you'll see lots of people saying it's not possible to change the name of index.php to blog.php or site.php or anything else.php. But it can be done. I know it. I've done it. Here's how... Change the Name of index.php Changing the name of index.php is very straightforward. In these examples we will rename index.php to blog.php Open .htaccess file of the root site for editing Change every instance of index.php to blog.php Change every instance of index.php to blog\.php to blog\.php Add the directive … [Read more...]

Getting Rid of the WWW for WordPress Multi-Sites

I had a brainwave today. A good'n. More like a tsunami than a brainwave. For a couple of weeks I've been figuring ways to ensure the URLs for all my sites are written with the www hostname dropped. This should be an easy task. In most cases we can just do something like: [crayon-5350b8995252a192653153/] Which tells the server to look for URL requests beginning http://www.domain.tld or URL requests beginning www.domain.tld and to rewrite them as http://domain.tld without the www. Works great... except when you have subdomains. For example, with the above directives at the top of … [Read more...]

WordPress Security Hardening with .htaccess Rules

This way of protecting your website uses a combination of htaccess rewrite rules to harden WordPress sites at the server level, plugins to harden WP sites at the site level i.e internally, and plugins to detect changes to files and the database SQL injections. There's no need to be squeamish. Toughening WordPress is easier than it looks but there are caveats: No site or server can ever be 100% secure from malicious bots, hacker scripts or other non desirables. Denial of Service (DoS) attacks require a very different method of site protection. The site defence methods shown here have … [Read more...]