How to Disable Plugin and Theme Updates and Installation

Due to installing a faulty plugin to one of my sites, I had an experience of being hacked — twice. What I noticed is that every time hackers got access to my site, they tried to install a new plugin. Because I already disable file editing in my WordPress dashboard, these new plugins they install are probably meant to be used as backdoors in the future.

So I found this quick way to disable future installs of plugins and themes (by wpmudev). To your wp-config file simply add

/**Disable plugin and theme updates*/
define('DISALLOW_FILE_MODS',true);

Unfortunately this prevents even your own updates and installs as well. Once the line is added to your wp-config file, you will simply stop receiving new updates notifications.

In the future, I will probably need another solution, but for now this is good enough for my compromised site that keeps getting hacked. I will settle for this code until I figure out how to close the backdoor.

Forgot your WordPress Username or Email? Here is How to Find it!

wordpress database

If you build so many websites that you eventually forget not only your password but even username or maybe even email you used to install WordPress, here is how you can find it (provided you still remember how to access to cPanel where your site is hosted):

1. Go to yourwebsite.com/cpanel and login using your hosting login details.

2. Under “Databases” find “PHPMyAdmin”

3. Find the name of your WordPress database installation in the left column and click on it.

wordpress database

4. Click on wp_users either in the left column or in the center of the page.

wordpress users in database

Next you will see the list of all users, their usernames and their emails, including your own. You now can sign in or reset password using your email address if necessary.

Handling Index.html Error Issues in WordPress

redirect cpanel

This quick tutorial will help you fix 404 error issue when you request index.html for your WordPress site. If you initially started out with WordPress you will not have this problem, but those who were on different platforms or had static websites that used index.html page, then converted to WordPress might still have old links pointing to domain.com/index.html.

It is a good practice to make your website’s homepage available ONLY under “domain.com” or ONLY under “www.domain.com”. If your website is available under

  • domain.com/index.html
  • domain.com
  • www.domain.com
  • www.domain.com/index.html

you are deluding link juice and wasting PageRank. While it’s true that Google can sometimes figure out that all these are same, it is not always the case. It is your responsibility to set up your website properly and quit relying on Google to figure things out.

Back to index.html issue, some WordPress themes and frameworks will handle that automatically. You can test that by typing in yoursite.com/index.html into your browser and see what you get.

If you get homepage you don’t need to do anything, if you get 404 page we need to fix that.

Method 1

If you have a static page set as your homepage and are using plugin like .html on pages to add .html at the end of your pages’ URLs, you can easily fix the issue by doing the following:

  • Temporarily assign any other page to be your homepage (just for about 20 seconds, promise!) via Reading–>Settings.
  • Now go to Pages and find your original homepage and edit it’s URL to be index.html.
  • Go back to Settings –> Reading and assign this page to be your homepage again.
  • Check domain.com/index.html to make sure things work as expected.

Method 2

Install a plugin like “All 404 Redirect to Homepage” and it will always redirect all 404s (Page Not Found) including typos, broken links and non-existent index.html to your homepage.

Method 3

Another way is to first create index.html, then redirect it to homepage. This will not work on hosts that default to index.html BEFORE index.php. Hostgator and Stablehost default to index.html and if you attempt to do this there you will only get blank page instead of homepage. If you are using Hostgator, Stablehost or other host that has similar setup you should either use first method or contact your host and ask them to change default index page for you. Once they do you should be able to do what’s below.

Site5, on the other hand, doesn’t default to index.html from what I can see and this method worked there immediately.

First to create index.html:

1. Go to cPanel and choose File Manager (NOT Legacy File Manager), click on that and choose web root/public_html.

2. Once you are in your file manager click New File icon in the top left (NOT New Folder).

3. Create index.html by simply typing index.html and clicking Create New File.

create new file cpanel

4. Return to your cPanel and find URL Redirects and click to enter.

5. Add a new redirect by filling as follows:

– Type 301 (Permanent)
– Choose your site URL from drop-down menu and complete it by typing index.html in the blank area after the slash /
– Set it to with and without www

Here is how it should look like (please paste in the field “Redirects To” the version of homepage URL you are using, it can be either http://www.domain.com or http://domain.com. If you are an ex-SBIer you should use http://www.domain.com):

redirect cpanel

6. Click Add and you should be done.

Type into your browser yourdomain.com/index.html once again and see if redirect worked (it should!).

Forgot Your Computer Password?

forgot computer password


Found this today. Didn’t try this myself but seems very useful. It looks like your computer password can be reset by opening your operating system in safe mode by pressing F8 and then changing your password. Problem solved!

Once my son changed password on desktop computer and then wasn’t sure what was that. Luckily we could guess it at the time. Now I am not afraid of similar situations anymore!

Traffic Drop After Site Redesign?

Traffic Drop After Site Redesign?

While this wasn’t original plan (because there was no original plan to begin with) here at Webmaster’s Diary I often deal with webmasters who are switching from one web hosting company to another often redesigning their websites in the process.

Obviously, these changes are done to improve their websites’ performance and usability. They all typically

  • improve design,
  • switch to responsive theme / template,
  • improve site speed.

All these are great improvements and it’s only logical that these webmasters expect traffic boost as a reward for their effort. However, it is not always true.

Traffic Drop After Site Redesign?

Unfortunately cases when site redesign (even within same web host) will cause serious traffic drop are not unusual, so I thought I will post a few tips that can help avoid this:

1. DO NOT CHANGE INTERNAL LINK STRUCTURE
This is number one reason for traffic drop after major redesigns. It’s quite tempting to make all changes at once, especially if your redesign has to be manual and you spend days and weeks going through pages of a large site. Keep all links intact – this applies to links within the articles, menu links, links in footer and sidebars. Internal links are more powerful than many people think and if your site does well, it’s better to leave your links alone.

2. DO NOT CHANGE YOUR URLs
While it does sound obvious to many, I still see some site owners who don’t seem to understand why changing URLs can be a problem. This is especially true when you are switching from one CMS to another, like converting static HTML website to WordPress.

3. CHOOSE SEO OPTIMIZED THEME
SEO optimized theme or template doesn’t mean it will help you rank in Google. It only means it will not prevent you from ranking. Choose themes or templates that load fast, have H1 tags for titles, display page or post titles before your site’s name and don’t use too many scripts. Avoid Ajax, Flash and excessive JavaScript.

4. KEEP MAIN CONTENT AS CLOSE TO THE TOP AS POSSIBLE
While your layout is likely to change, you still can make sure you don’t have two sidebars before your main content in your HTML source.

5. KEEP AD LAYOUT SAME OR LESS AGGRESSIVE
You should either keep your ad layout same or make it less aggressive. If you decide that you want all your ads to be above the fold and push your main content down, you might get penalized by Google ad layout algorithm. Once you finish your redesign and the dust settles, you can certainly experiment with more effective ad positioning, but don’t do it during redesign process.

6. SKIP LARGE HEADERS
Don’t waste your precious real estate above the fold for useless header image that says nothing but your site’s name. Google appreciates content above the fold more than ever before, why not give it to them?

7. REMOVE NOINDEX TAG
Many a time when you switch from one web host to another or even converting to another CMS within the same host we include noindex tag to new development site in fears of duplicate content. While this may be a good idea in some cases, some webmasters forget to remove this tag when new version of their site goes live (supposedly).

8. CHECK YOUR ANALYTICS
Sometimes it’s easy to get caught up in site redesign and simply forget to include analytics code to your pages. If that’s your case, your traffic drop is not a drop, you simply need to include tracking code!

UPDATE: Just to make things clear, even changing your WordPress theme can affect your traffic. There is a number of things that could wrong, please check my answer in comments here.