Our site developer built a new site for us on wpengine.com. They did a search and replace to fix the URL references before exporting the database and zipping it with the site files to send to us.

I installed and configured everything I know to install (MySQL 5.7.33, URL Rewrite 2.1, PHP 7.4, Wordpress 5.6) and got that all working with a vanilla Wordpress site configured for multisite. I then copied over the new site files, imported the database, and adjusted web.config and wp-config. There is currently only one site in the install. The developer is still building the additional sites for us.

I can get to the home page of the first site, but clicking any links to subpages gives me a 404 Not Found error. I can log in to the admin portal, but it prompts me to re-enter my username and password if I click in to any of the menus. I added the 7 rewrite rules I found in posts on this site. I also tried using IIS's URL Rewrite module to convert the rules from the .htaccess file that came with the new site. I'm a bit out of my element and have exhausted my Google-fu. Does this sound like a rewrite problem or something in the database?

UPDATE: I made some progress. I downloaded a fresh backup of the now live site from wpengine and did a more controlled copy of it into the working, clean Wordpress install on my test server. I only copied wp-content and some files from the root directory that were not present on the test server. This fixed access to wp-admin.

I was then able to tinker with the Permalinks setting. Our developer had it set custom as /%postname%/. If I change it to /index.php/%postname%/ I can get the first level and some second level subpages to work. As I browse deeper though, I eventually get "Sorry, we couldn't fin what you're looking for," or the original 404 error I was getting before.

Am I correct to believe this says it's a problem with the rewrite rules and/or permalinks setting?

  • Have you considered keeping your efforts on wpengine.com hosted services? To avoid all the minutiae? Unless you have tons of time to invest. Jan 31 '21 at 22:49
  • I have. Our developer is hosting it in their wpengine account while I tinker. We're an employee-owned company, and the bottom line is always paramount. In reality, our site doesn't get a lot of traffic. We're not the type of company people seek out via web sites and Google searches, and we don't do any ecommerce. The site is purely for company visibility, so if I can save some money by self hosting I'd like to. I got our previous site (also Wordpress, but not multisite) running on an inhouse server, so I hoped I could do it again, plus I'm stubborn and determined in the face of a challenge.
    – bchap
    Feb 1 '21 at 23:11
  • The very best to you in 2021. For assistance, view profile, Network profile for contact info and free downloadable Utility Scripts to assist with performance tuning. wpengine.com hosted data does NOT allow my type of suggestions to be applied. Feb 1 '21 at 23:17
  • Progress update in original post. Still looking for advice. Anyone know of a good resource where I can teach myself to code the rewrite rules?
    – bchap
    Feb 3 '21 at 18:43
  • It's coming at it from the other site, but Helicon Ape appears to be a tool to make IIS obey .htaccess rules. (Free to try, then it looks like it's $47 and up for a license.) (I've never used this product, it's just something I found in my Googling.)
    – Pat J
    Feb 3 '21 at 18:50

Your Answer

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

Browse other questions tagged or ask your own question.