Join Robert Ring for an in-depth discussion in this video Troubleshooting manual installation errors, part of Magento Community Edition 2 Essential Training.
- [Narrator] When Magento is preparing to install your Magento site, during this readiness check phase, it's possible you may encounter some errors, and if you do it'll look something like this. You'll have a red X next to wherever there's a problem. It'll tell you there's an error. And it won't let you continue until you fix that error. So let's go through each of these one by one. Just go through a couple of the more common things that you might come across. Before we address this error specifically, let's take a look at PHP Version Check.
Magento, of course, checks to make sure that you have the minimum PHP version that it will work with. If you don't, then it'll give you an error here, and it will tell you that you need to use PHP, in my case 5.6, or whatever the case may be. Now if you're running your own server, you probably know how to update PHP on your own. Again, if you're working with a company like Nexcess, then they'll have the proper version of PHP for you already. If you're using another host, and you get this message, and you're not quite sure what to do about it, you may be able to take care of this on your own.
If you're using cPanel, you may have an icon that says Select PHP Version. In this particular cPanel environment, I have this under my software grouping. And if you click on that, then you outright have the ability to select whatever PHP version you want. And then you would click Set as current. If you do that, and then try this process again, then that's all you need to do to fix it. If you don't have the ability to go here on your own, then you'll have to get in touch with your hosting provider, and see if there's anything they can do to update your version of PHP.
Now that may sound kind of like a pipe dream, but in a lot of cases, web hosting providers are very helpful, and it's not really uncommon that they can do that for you. It may sound like some wild request, but in many cases they can accommodate you in that way, or at least say, "Hey, you can upgrade to this package that offers that ability." If you get an error like this one right here, a PHP Settings Check, often it's going to be this one that says always populate raw post data equals zero, blah blah blah blah blah, please open your php.ini file, and set always populate raw post data to negative one.
If you get his message, then you need to go to your site's root directory, and try to find a php.ini file. In some situations, you might not have that file, and if you don't, that's another case where you need to get in touch with your web hosting provider and say, "Hey, I'm trying to install Magento. It's giving me this message, that I need to set this equal to negative one, but, I don't have access to my php.ini file. Is there anything that you can do to help me out?" In fact, as I was installing this on one of my own personal servers on another web host, I was unable to edit my own php.ini file directly.
Or rather I was, but it wasn't doing anything. And they gave me a very easy workaround that involved editing my .ht access file. So again, even if you can't do this on your own, get in touch with your web hosting provider, and usually they can do something to help you out. But, the default solution to this is, once again, go to your website's root folder, see if you have a php.ini file. If you do, it'll look something like this. Then you can go to the bottom, and maybe start a comment, by starting a line with a semicolon, and say something like for Magento, so you remember what this is here for.
What we're wanting to do is set always populate raw post data to negative one. So we'll write always_populate_raw_post_data, that's a heck of a variable name, equals negative one. And then save that. And that may be all you need to do to fix this problem. Another issue that might come up, is with your PHP extensions. It's possible that you might not have all of the PHP extensions installed or enabled that are necessary for Magento to run.
Now again, if you're running your own server, if you have SSH access and all that, you probably know how to do this. You just need to get those extensions, and make sure they are enabled. If you're using something like cPanel, you may, once again, have this Select PHP Version option. We're going to go to the same place. This is the same place we went earlier, to change the actual PHP version. Notice all of these things here, all of these checkboxes, these are all PHP extensions. Whatever extensions here it tells us we're missing, we would just need to find those, enable them by checking them, and clicking the Save button.
Then go back and try this process again. And everything should be fine. And again, if you don't have the option to do this on your own, get in touch with your web host and say, "Hey, I need this and that extension installed for PHP, in order to run and install Magento. Is that possible, can you help me out?" Hopefully, they'll be able to do something for you. And, once again, at risk of repeating myself, if you're using a company like Nexcess, or some other Magento-focused web hosting provider, they will have all of this stuff setup for you already, so this is a problem you will not encounter.
Finally, sometimes, after you install Magento manually, you may notice some problems here on the backend. A couple problems that I've encountered when doing this, is all of this information here where it says Dashboard, and it's got all of this, it gets pushed down, like way down far right here, and there's lots of blank space here. Sometimes, these images fail to show up, and other times, if you click on one of these areas, as I'm doing right now, this is a problem that I'm having at this exact moment, as you can see.
To fix this, you need to go back to your File Manager. Go into the app directory. Then the etc directory. Then you're going to find this file di.xml. You want to Edit this file. This is a fairly large file that looks like this. You want to find, just do a Control-F search for developermaterialization, and you should find an area of xml that says argument name equals materializationStrategyFactory.
developerMaterialization and then, virtualType name equals developerMaterialization. Right below that, you'll see this item name equals view_preprocessed. And then Magento\Framework\App\View\Asset \MaterializationStrategy\Symlink. And right below it we have the same thing, but instead of \Symlink, we have \Copy.
What you want to do is change that to Copy as well. Capitalize the C here. Save your changes. And close that out. Now once you've done that, go back up in your file directory, or your file system, rather, find your pub directory. Go into the static directory. And you want to delete both _requirejs, and adminhtml.
Select both of those, click Delete. Confirm. And that should clear up the problem. Let's see, if we go back to our website now, and refresh the page, let's see if that fixed the problem. If I click on something now, notice, now it's working just right. And this is crucial, because these are the areas you have to go, to setup your site eventually, which is what we're going to get to very soon. We got System, we've got Products. We've got content, we've got Configuration.
This is where we build our site. So if you can't make these things pop out, you basically can't do anything. So, again, this is a problem that I've most commonly come across. And this solution always fixes it for me. Be careful when you're deleting those directories that we talked about. You do not delete .htaccess. That'll mess everything up a little bit more. You might need to go back through the installation process once again. But again, these are of course not all of the errors you may encounter. These are just some of the more common ones that I've seen.
Hopefully, if you're having an issue with any one of these, then these solutions will work for you. If not, then you'll probably just have to do the traditional Googling, or search over on Stack Overflow or Stack Exchange. Usually if there's any other problem, you're not the first person to come across it, and you'll be able to find a thread, or an explanation somewhere, of what you can do to fix your problem. And I know I'm sort of repeating myself here, but this is another reason why I really recommend finding a web host who's very well versed in Magento, and even offers Magento specific packages, because with them, you're not going to have any of these problems.
They have everything setup just right, to where as you're installing Magento, or especially if they install it for you, you're not going to have any of these issues, because they know what might come up. They have everything setup just perfectly to run Magento, and you don't have to worry about doing all of this kind of crazy troubleshooting.
Magento is one of the most popular ecommerce solutions in the world. But this powerful content management system also has a reputation for being challenging to learn. This course is designed to address that issue. Here, learn how to set up your own ecommerce site using Magento Community Edition. Instructor Robert Ring walks through how to manually install Magneto and configure content and stores. He also explains how to create basic products, organize those products, create a homepage, set up payment methods, configure shipping and automated emails, and more. Throughout the class, Robert demonstrates key concepts as he walks through the construction of an ecommerce site that sells coffee products.
- Troubleshooting manual installation errors
- Content and store configuration
- Creating a basic product
- Organizing products
- Creating a homepage and a footer link list
- Setting up payment methods
- Broad tax configuration
- Configuring shipping and automated emails