While Magento may be a good and stable system, there are times when you might need to make a few tweaks and adjustments. Sometimes issues arise that need to be taken care of to keep the site working properly.
In this tutorial, I’m going to show you how to fix Magento issues that you may come across after building your website. Some of these are quite simple and don’t take a lot of programming knowledge to address.
Configuring a New Domain Name in Magento
What if you decide to change the domain name of your site to something more appropriate? In the past, many eCommerce owners decided to simplify the URL or make it more marketable for what they sell. In any case, you’ll need to configure Magento to work with the new name.
Changing the Domain in Magento
From Magento, select the Stores section and click «Configuration.»
Click the «Web» tab on the left side of the screen.
Click to expand the «Base URLs» options.
Change the Base URL to reflect the new domain and click «Save Config.» For example, you would enter «http://www.ggexample.com.»
If you use an SSL to support secure access, do the same for Base URLs (Secure). It may not be a bad idea to do this even if you don’t have the SSL attached. It will save you a step later on should you choose to add it.
Clearing the Cache
When you make any change to your website, it’s always best to clear the cache. This keeps the file system current and optimized for your visitors.
Go to the System section of Magento and click «Cache Management.»
Click the «Flush Magento Cache» button on the top. After the site clears its data, your site is ready for visitors to the new domain name.
Resetting the Admin Password in Magento
Perhaps you forgot the administrative password to Magento. Maybe someone stole it, and you want to change the password before someone wreaks havoc on your site. For whatever reason, changing the admin password is relatively simple.
From cPanel, click the phpMyAdmin tool.
Find your database for Magento in the left column and click it.
Click the «SQL» tab along the top toolbar of phpMyAdmin.
Paste the following code in the box for queries:
You will have to change the newpass to the new password and AdminUsername to the admin username.
Once you’ve entered the query, click the «Go» button on the bottom right.
If you have access to the admin panel of Magento, or if another user can access it, you can also change the password for the account in the System area under «All Users.»
Setting Magento to Use Search Engine-Friendly URLs
Search engine-friendly URLs are those that improve how sites like Google crawl and categorize your content. It’s also beneficial for visitors if they see URLs that are easier to identify with the content.
In the configuration screen of the Stores section, click the «Web» tab.
Click the Search Engine Optimization function and select «Yes» from the rewrites option. This may already be set by default in Magento 2.0 and later.
Click the «Save Config» button on the top right, and you’re done. You may have to flush your cache afterward to keep the site running smoothly.
Setting «WWW» URLs to Open Magento
Depending on how you have the domain set up through your Magento web hosting account, sometimes the «www» in a URL may not work. You may also want to set the prefix to open because of SEO or usability reasons. Regardless of the purpose, you can change how Magento opens the website when shoppers visit.
Edit the «.htaccess» file of Magento from File Manager in cPanel.
Input the following code at the top of .htaccess and save the file (replace «ggexample.com» with your domain).
Once the changes in .htaccess are saved, you’ll need to change the Base URL in Magento.
Go the Stores section and click «Configuration.» In the Web tab, you’ll find the Base URLs option. In the Base URL text box, input your website with the WWW prefix. For instance, you may enter http://www.ggexample.com. Save the configuration once you are done.
Do this to the secured URLs as well if you use SSL.
Solving Access Denied in Magento
If some areas of the site give you an error stating access is denied, the permissions may be altered for the account. To fix this, you’ll need to change the permission for the particular role.
The first thing you should try is to log out of Magento and then try to log back in again. It probably wouldn’t hurt to clear the cache of your web browser before attempting to log in. This will eliminate cached file problems as a factor.
Otherwise, go to the System section of Magento and click «All Users.»
Click on the account in question to open its settings.
Click the «User Role» tab on the left.
Verify the account is set to Administrators. Otherwise, change it and click «Save User.»
You can also verify permissions set by accessing «User Roles» from the System area. From here, you can create custom rules and create specific roles for you and your team.
One thing you want to check is the «Resource Access» option. For administrators, this should always be set to «All.»
These are only a few problems that you may face while maintaining the website. To fix Magento issues keeps your eCommerce location running at optimal performance. When you first build an online store, you may not realize the amount of effort you need to put in to keep it running smoothly. Remember, effort plays heavily in success.
Author: Chris Racicot
Chris is the Support Manager at GreenGeeks and has been with the company since 2010. He has a passion for gaming, scripting and WordPress. When he’s not enjoying his sleep, he’s working on his guitar skills and fiddling with 3d printing.