No styling after installing Magento 2.4.0

Hi Craig,

I’m a very impatient person and I tried to installed M2.4. I know that you get there on some stage but I just couldn’t wait.

The installation process went smooth, however, the site is crashing.

I don’t want to ask stupid questions cos there could be hundreds of reasons why the site isn’t displayed correctly but looking at the screenshot where should I start looking?

Thank you.

My environment as follows: Oracle Virtual Box, Ubuntu 20.04 LTS, Apache 2.4.41, PHP7.4.8, MySQL 8.0.21, Elastic search 7.6, PhpMyadmin v5.0.2 installed, updated , and secured.

I also tried on Ubuntu 18.04 but the site isn’t displayed correctly too so it isn’t an OS fault.

Not sure. Definitely related to Static Content generation, so Permissions or Caching. Maybe apache rewrite at a push, but you could verify that if backend URL produced a 404.

How were you able to log into the Admin after installing 2.4.0? I couldn’t get passed that part without installing postfix for the 2FA setup. And simply disabling the 2FA module is completely counter-productive.

My permissions should be OK.
I cross-checked it referring to this tutorial.

Backend URL doesn’t produce a 404 error so this also should be good. I’ll try to reinstall it again but I did it probably 5 times with the same results. I’m definitely doing something wrong.

Refer you to 2fa I didn’t get there yet.

Please throw any findings into this post. Even your scribbles. Once you publish a proper ‘How to install M2.4 tutorial’ and more importantly ‘How to upgrade M2.3 to 2.4’ We’ll remove the post. It could be for impatient people like myself.

Is this an upgrade or a clean install? If it’s a clean install, can you confirm that you’re using the bin/magento setup:install command to install Magento after preparing the directory? If so, did you remember to add the --use-rewrites=1 value?

Example install command (post directory/user preparation)

bin/magento setup:install \
--base-url= \
--db-host=localhost \
--db-name=magento \
--db-user=magento \
--db-password="ABCDefg!£$%1234" \
--admin-firstname=john \
--admin-lastname=smith \
[email protected] \
--admin-user=john \
--admin-password=craig@123 \
--language=en_GB \
--currency=GBP \
--timezone=Europe/London \

I’ve you’ve already installed it without setting use-rewites=1, then you can always set it after using:

bin/magento setup:store-config:set --use-rewrites=1

I presume you’d need to clear cache and regenerate content. Obviously, this assumes that you’re issue is related to this setting so might not even work.

2FA bit…

When you get to the 2FA bit, note that I’ve already raised a GitHub issue addressing this: It makes me sound like I’m moaning, but I feel like they are constructive and valid criticisms with some decent suggestions.

Yes, it is a clean install. I’m not touching upgrades just yet.
I think I’ll wait for your tutorial. I have to much to loose :slight_smile:

Probably I’ll experiment upgrade on a virtual machines but at first I want to be confident with installing is and configuring it.

My installation command looks almost like yours so I still don’t know what I’m doing wrong.

bin/magento setup:install
--base-url= \
--db-host=localhost \
--db-name=magento_database \
--db-user=magento_user \
--db-password=blabla \
--admin-firstname=Pawel \
--admin-lastname=MyLastName \
[email protected] \
--backend-frontname=admin_pawel \
--admin-user=UserName \
--admin-password=myPassword \
--language=en_GB \
--currency=GBP \
--timezone=Europe/London \
--cleanup-database \
--sales-order-increment-prefix="ORD$" \
--session-save=db \
--use-rewrites=1 \
--search-engine=elasticsearch7 \
--elasticsearch-host=localhost \

Maybe my environment causing issues. I know that M2.4 has some issues with php7.4.2 but I use php7.4.8.

The elasticsearch values are pointless. If you don’t set them, they already default to those values.

I’ll carry on with my video once I get clarity on the 2FA bit. I’m not putting out a video that contains incorrect information.

I just noticed that you have a “/” at the end of your base-url. The Official Magento Documentation doesn’t include the slash at the end of the URL when setting it via the bin/magento setup:install command.

1 Like

Thank you for all your tips.
I’ll be fighting with it.

I removed the forward-slash, run the command and all is good now :slight_smile:
I just stuck with the 2FA haha. It will keep me occupied. I need to crack it today :desktop_computer:

For some weird reason creating a virtual host in the Apache config affected this on my side.
So http://localhost/mymage was not working but http://www.mymage.test worked fine.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.