Create a new admin account in WordPress via FTP

Wordpress

If your Wordpress admin account get locked then you can try to restore admin account access by using the “Lost your password?” link on the admin login page or you can try to reset your password by directly updating it in database.

There is one more way if you have FTP access to your Wordpress installation folder. Guess How? By creating a new admin account.

Continue reading »

How to add sorting option – “Sort by Date” in Magento

Sorting

You may want to provide a sorting option “Creation Date” so that customers can easily find the newest and the oldest items.

To do so extend the class “Mage_Catalog_Model_Config” located at {{MAGENTO_ROOT}}/app/code/core/Mage/Catalog/Model/Config.php in a custom module and override the function “getAttributeUsedForSortByArray()”

Continue reading »

How to enable/disable the demo store notice in Magento

Magento

Magento provides a configuration option to help you show a demo store notice when your web store is not yet live and you are just running a demo store.

To enable/disable the demo store notice:

  • Log into the Magento Admin
  • Navigate to System >> Configuration
  • Select the Design Section

Continue reading »

How to enable compilation in Magento using the command line tool

Compile

The compiler in Magento makes a copy of every class used by the Magento system in the directory “includes/src” using the full class name as the filename. Thus, Magento Autoloader has to look only in the directory “includes/src” instead of traversing multiple paths.

Magento ships with a command line script “compiler.php” located in the shell directory present at the {{MAGENTO_ROOT}} of you installation.

Continue reading »

How to enable compilation in Magento

Compile

The “Compilation” tool in Magento was introduced to give a performance boost to the Magento website. Complation tool does not convert Magento PHP code to Bytecode but what it does is that it concatenates various PHP files into larger files and stores them in a single location “includes/src”. So now the Autoloader has to look in includes/src and will open less files. Without Compliation enabled the Autoloader has to check app/code/local folder, app/code/community, app/code/core and finally lib in sequence in order to load a class.

Continue reading »

Connecting to the MySQL Server using MySQL client program

Connnect

For connecting to the MySQL server you need to use MySQL client program. It needs to be provided parameters such as the hostname, username, password etc. to connect to the MySQL Server; if no parameters are specified the default values are assumed. Any of the connection parameters can be specified to override the default values.

Connecting to a local server specifying username and password

# mysql --user=username --password=mypassword databasename;
# mysql -u username -pmypassword databasename;

Continue reading »

Setting user account passwords in MySQL

Password

It is important to have passwords for all MySQL user accounts for securing the database. If anyone knows the username of an account with no password then he can successfully connect to the database server.

To assign or change a password for an existing account


mysql> SET PASSWORD FOR 'newuser'@'localhost' = PASSWORD('mypass');

NOTE: Only users such as root that have update access to the mysql database can change the password for other users.

Continue reading »

Deleting user accounts in MySQL

User

The DROP USER statement is used to delete MySQL accounts and their privileges.


DROP USER 'accountuser'@'localhost';

If you wish to delete multiple user accounts then you can enter them comma separated as shown below:


DROP USER 'accountuser1'@'localhost', DROP USER 'accountuser2'@'localhost';

Continue reading »

Changing the “Position” text to “Default” in the “Sort By” dropdown on product listing page in Magento

Magento

In Magento Vanilla installation the products are sorted based on “Position” on the product listing page by default. You have the provision to configure the default sorting parameter from Magento admin. In Magento Vanilla installation admin the options available are – “Best Value”, “Name” and “Price”. “Best Value” sorting is actually sorting by position.

“name” and “price” are catalog attributes but “position” is not.

If in case you need to remove sorting by position then you will have to override the Catalog module model but if just you need to change the text then you can do it with the help of locale files.

Continue reading »

Creating user accounts in MySQL

User

MySQL user names can be up to 16 characters long.

Here are the queries for creating user accounts in MySQL:

Create user with no password


mysql> CREATE USER 'newuser'@'localhost';

Create user with password test123


mysql> CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'test123';

Continue reading »

Back to top