0

I have a major issue with wordpress on my new website. Anytime I upload a new media, its attachment page gives me a 404.

My permalink structure is the following:

baseurl + /%category%/%year%/%monthnum%/%day%/%postname%/

I have hundreds of media (imported from old website) and they all give a 404. I can access the media directly but not the attachment page.

There is an attachment.php provided with the theme and I know it works because my old website used the same theme.

Any idea what to do ?

1

Actually I got to the bottom of it.

The problem was that I have installed the WPML plugin. But I forgot to install the WPML Media plugin. As soon as I installed it, the attachment pages started working again.

In my opinion, this is unacceptable and I will escalate the issue to WPML team. If the Media plugin is so critical, it should be made obvious to the users or it should be install automatically.

0

It sounds like a migration issue. This is worth checking:

  • Did you replace the old website URL in all your database occurrences using a replacement tool like this?
  • Is the .htaccess on your web server updated with the right path and permalink rewriting rules? (Saving again your permalink preferences should do the trick.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.