I am brand new to Drupal. So much so this is my first install. I have been working in wordpress for all my sites but I have a potential new client with a Drupal site. I figured it was time to become familiar.

I have setup my site http://drupal.shawnwright.net/ and things seem to go well. At the home page, when I click on any of the buttons, configuration, appearence, add content, etc, I get a 404 error.

I am sure I missed something in the setup. I am running Drupal 8 and am using PHP 5.6. Any thoughts on what I did wrong?

Shawn

Comments

Jaypan’s picture

It looks like you're missing the Drupal .htaccess file that goes in webroot.

Side note - you should never take on a paid client site as your first Drupal site. Drupal has a very steep learning curve, and particularly with Drupal 8 where there is very little documentation on the net, since it is so new. Drupal is playing the long game - you want to build a couple of sites first before selling your services first.

shawninhwd’s picture

Shouldn't it have written or installed the .htaccess on installation or do I need to find it somewhere?

I agree with you on the client. I have no intention of building their site. They already have one and they are tired of making the call to the company for small changes and tweaks. This is a good excuse to learn something new.

UPDATE: i found the htaccess file and loaded it. All the formatting went away.

gauravktomar’s picture

Hi Shawninhwd,

Please check if mod_rewrite is enabled or not. (Apache settings in httpd.conf). Otherwise, it might be Drupal's .htaccess issue as Jaypan said.

If still not able to find solution, please reinstall Drupal 8. .htaccess file should be automatically there in the site's root directory.

Thanks!

yapDesign’s picture

I had the same issue and this worked for me, thanks!

bb37’s picture

I know this is an old question and answers, but I discovered something today that frustrated me for a bit.

I'm doing a manual install of Drupal 9 on an A2hosting shared web account. The install seemed to go OK, but I was getting 404 errors when I tried to go to admin pages. The answers here triggered my thinking and I found a solution.

By default, the cPanel File Manager at A2hosting is set with "Show Hidden Files" unselected. I extracted the Drupal tarball using cPanel File Manager which created a Drupal-9.3.7 directory. I again used File Manager to copy the files from that director to public_html. However, since hidden files were hidden, I didn't select them so they could be copied. As a result, the default Drupal .htaccess file didn't get copied to public_html and I got 404 errors.

In cPanel File Manager in the upper right corner is a button labeled Settings. Click on that button and there's a checkbox for "Show Hidden Files". I turned that on, saw what I was missing, and copied .htaccess to public_html. Everything works now!

Thanks to the Drupal community for making this old man think for a minute so he could solve his problem.

BetoAveiga’s picture

Wow, man! You are my hero today! I was having this same error, I've never seen this before, and your solution worked, perfect!!! Many thanks! :D

Drupal Backend / Frontend Developer