0321-2222869
Call Now
0341-2496955
0300-2418543

Knowledgebase

How to Create a Database Username in cPanel?

1. Log into your cPanel account.
2. In the “Databases” section, click on “MySQL Databases” Icon.
3. Under “MySQL Users” in the “Username” field enter the new username you wish to create.
4. Enter your new password or use a password generator.
5. Click on the “Create a User” Button.

19

Tip: Write down the Database Username and Password on a notepad so that when you need them, you can easily recall them while installing a script manually.

How to delete a database in cPanel?

1. Log into your cPanel account.
2. In the “Databases” section, click on “MySQL Databases” Icon.

3. Under “Current Databases” you can see a list of all your databases. Locate the Database you wish to remove and then click on the “Delete” icon.

18

4. Click on the “Delete Database” button.

How to rename a database in cPanel?

1. Log into your cPanel account.
2. In the “Databases” section, click on “MySQL Databases” Icon.

3. Under “Current Databases“, You can see list of your all databases. Locate the Database and then click on “Rename” Icon.

16

4. Change database name and then click on “Proceed” button.17

How to create a database in cPanel?

1. Log into your cPanel account.
2. In the “Databases” section, click on “MySQL Databases” Icon.
3. In “New Database: Username_” field enter a name for the new database you wish to create in the text field.

15

4. Click on the “Create Database” Button.

php error: Allowed memory size of x bytes exhausted

If you are getting an error like “Allowed memory size of… in file /directory/folder/yourscript.php“, then you can use an .htaccess trick to resolve this problem. If this error does not go away even after you apply this .htaccess code, you should contact us and we will help you.

Place this code in your .htaccess file of your main domain and if this error persists even after you have used the code, enter it in a directory where you are receiving an error, such as example.com/directory/folder/.htaccess and place the code in the /directory folder.

RLimitMem max

How to redirect a page to another page or website using .htaccess?

If a page on your website no longer exist and you want to redirect it to your new page or website then you can use the .htaccess file for redirection without waiting.

Redirect from a page/directory to another domain or the main domain:

Redirect from a specific page to a domain:
RewriteEngine on
Redirect 301 /mypage.html http://example.com

Redirect from a page to another page:
Redirect from a page/directory to another page
Redirect 301 /oldpage.html /newpage.html

Now, whenever you open the url example.com/oldpage.html, it will automatically redirect you to example.com/newpage.html.

 

How to create a user-friendly URL using .htaccess?

How to create a user-friendly URL using .htaccess?

If your website is using long URL like example.com/files/folder/sitemap.html, you can change it into “example.com/sitemap” in .htaccess

Modify this line according to your needs and then add this code to your .htaccess file.

RewriteEngine on
RewriteRule ^sitemap/$   /files/folder/sitemap.html [L]

 

How to restrict directory access by IP address?

In order to secure your admin area from hackers, we recommended you to allow access only from your selected IP to your admin directory. You just need to create an .htaccess file in the directory where you want to restrict access by IP Address.

For example, if you have a WordPress blog installed on your main directory like example.com/wp-admin, you should create an .htaccess file in /wp-admin/.htaccess and you should put this code in, and not forget to replace the allowed IP address with your IP address.

order deny,allow
deny from all
allow from YOUR-IP-ADDRESS-HERE

(Replace “Your-IP-Address-Here” text with your IP Address)

You can test this by accessing your /wp-admin IP address from another IP address which is not allowed by your .htaccess file.

 

How to protect your .htaccess file?

For security purpose we recommended you to prevent access to your .htaccess file from unauthorized access.

Add this code to your .htaccess file:

# .htaccess protection

order allow,deny
deny from all
satisfy all

How to disable directory browsing using .htaccess?

For security purposes, we recommend that you to disable directory browsing on your website so no one can see the files/folders of your website.
You can disable Directory Browsing by adding this line to your .htaccess file.

Options -Indexes