When a web browser is pointed to a directory on your website which does not have an index.html file in it, the files in that directory can be listed on a web page.
Directory Lister is a simple PHP script that lists the contents of any web-accessible directory and allows navigating therewithin. Simply upload Directory Lister to any directory and get immediate access to all files and sub-directories under that directory. Directory Lister is written in PHP and distributed under the MIT License.
In this post we will be learning about redirects. And see how you can redirect your web-page.
We will see two ways to redirect web-pages:
Through your registrars’ Cpanel.
Right into your code.
Through cPanel redirect feature
You can easily redirect your visitors from one page to another with the help of the Redirects feature.
To setup a redirection, access your website’s Control Panel and locate the Redirects menu.
In the Create a Redirect section. You can set up a redirection from one page of your website to another. This also works for subdomains or completely different websites.
If you choose to use HTTPS, make sure the redirected page has a certificate first, because redirecting to a website without an SSL certificate but using the HTTPS protocol for it, will most likely land your visitor to an error page
Now let’s see how you can set redirection by including few lines in your code.
The simplest way to redirect to another URL is with the Meta Refresh tag. We can place this meta tag inside the <head> at the top of any HTML page like this:
// Use any of the following lines below.
window.location = "http://new-website.com";
window.location.href = "http://new-website.com";
The most common method of redirecting a web page is through adding specific rules to a .htaccess file on an Apache web server.
The error message “Your PHP installation appears to be missing the MySQL extension which is required by WordPress” can appear when you are using a PHP version which is incompatible with your scripts version. Meaning your WordPress installation is most likely outdated.
Since the ‘MySQL’ extension is no longer supported from PHP 7.0 and beyond, changing your PHP version to 5.6 or lower will fix the issue. This can be done via your website’s control panel’s PHP Configuration section.
So, let’s do it first and then we will see some probable causes of this error.
Step 1- Login to your Cpanel.
Step 2- Find PHP PEAR Packages and click on it. and then click on show available modules.
Step 3- Find MYSQL and install the 3 extensions shown in the image above.
Step 4- Now Go to select PHP version.
Step 5- Now find MySQL (Use Ctrl + F), select it and save it.
That’s it. The problem is fixed. Let’s get to some probable causes of this error.
Probable causes of this error.
1. PHP’s MySQL extension not installed.
The quickest way to check if your PHP has MySQL support is to put the following code into a file called info.php in your site and access it from a browser.
A MySQL section like this will be shown. If it’s not shown there, then you don’t have the PHP’s MySQL extension installed.
In Ubuntu servers and RedHat compatible servers, use the following commands respectivly:
2. Check if PHP’s MySQL extension directory is misconfigured.
Another cause of the ‘Your PHP installation appears to be missing the MySQL extension which is required by WordPress’. could be that the PHP extension directory is not configured properly.
In order to fix this, locate which PHP.ini file is being loaded and ensure that the appropriate “extension_dir” value is being used. So let’s open up the info.php file we created in Step 1 via our web browser.
Look for the line called “Loaded Configuration File”. The file path noted there is the actual location to the PHP configuration file.
Now, look for the entry called “extension_dir“. It should either be commented, or it should have the correct path to PHP extensions. It should never be left blank.
If you are not sure, just comment the line, and restart the web server.
Simply updating PHP and WordPress might also solve the problem.
In case you are running PHP 5, run the following commands:
apt-get install php-mysql
Restart the appropriate service for the changes to take effect.
This may have solved your problem. Feel free to comment below.
So, admit it. We put really strong passwords and then we forget them.
And you end up being locked out of your own website.
So here is how you can reset it quickly.
Go to your hosting control panel and then go to phpMyAdmin if available.
Look into the database which is being used for your wordpress installation and click on Users table
Inside users table, find the row responsible for your admin account. (check the user_nicename column for username match)
and Press edit.
On the editing screen, put your new password again the column password and Choose MD5 in left column FUNCTION
Now scroll down and save this password.
And that’s it. Go to your domain / wp-admin path and login with the new password you just saved.
What to do if you dont have phpMyAdmin?
You gotta have some kind of access to MySQL, so connect to it using the credentials inside wp-config.php file
Use the following command after replacing your details:
UPDATE `wppl_users` SET `user_pass` = 'e0a8aa81eb1762d529783cf587f6f422' WHERE `wppl_users`.`user_nicename` = 'admin';
If you remember the email address only, use:
UPDATE `wppl_users` SET `user_pass` = 'e0a8aa81eb1762d529783cf587f6f422' WHERE `wppl_users`.`user_email` = '[email protected]';
The above command will set your password to [email protected]. After this command you can login to wordpress admin panel and then reset your password to anything you want. Or use md5.cz to generate md5 for any password string and replace it with e0a8aa81eb1762d529783cf587f6f422
Do NOT forget to replace “wppl_” with your table prefix (stored in wp-config.php file)