• I am not a WordPress developer, nor am I about to become one (or, rather, that’s not the plan). I’m doing a sysadmin role, trying to move an existing WordPress/Apache installation to a new server, and I have a very basic question about what I presume to be a rewrite issue (I’m a complete WordPress newbie).

    So, my top level page, which I’ll call https://my.domain/, shows fine. But a page with a path, such as https://my.domain/area/subarea/ results in an Apache 404 error (when it works fine on the existing site). The directory I have as /var/www/mydomain/ does not contain an ‘area’ subdirectory with a nested ‘subarea’ subdirectory, as it would if this were a static site, so I am assuming that a path such as https://my.domain/area/subarea/ is processed via WordPress and handled accordingly. So the question is what am I likely to be missing here which defines this, given that I have, I believe, all the source from the existing site?

    • This topic was modified 2 years, 3 months ago by johnny2r.
    • This topic was modified 2 years, 3 months ago by johnny2r.
    • This topic was modified 2 years, 3 months ago by johnny2r.
Viewing 12 replies - 1 through 12 (of 12 total)
  • Hi,
    please do the wordpress site health check, the wp admin should be reachable for you because the wp-admin dirctory structure really exists on the server.
    I assume that you are missing some php modules, any missing modules are going to appear as missing in the site health check

    • This reply was modified 2 years, 3 months ago by Benedikt Ledl.
    Thread Starter johnny2r

    (@johnny2r)

    I do not currently have access to the WP Admin, because I don’t have the credentials of the admin user. I am creating an admin user programmatically.

    Thread Starter johnny2r

    (@johnny2r)

    Hmm, that hasn’t helped. Having procedurally created the admin user (via a function in functions.php), I attempted to log in and the log in seems to be accepted but I’m immediately redirected to https://my.domain/my-account/?loggedin=yes, which gives a 404 error. (Obviously my.domain is not my real host name, in case that isn’t clear).

    hi so youre not redirected to /wp-admin/?

    Thread Starter johnny2r

    (@johnny2r)

    This is after /wp-admin/. Having input my username and password, I am redirected to https://my.domain/my-account/?loggedin=yes, which doesn’t exist (404 error).

    Thread Starter johnny2r

    (@johnny2r)

    Given that I have a complete backup of the entire directory for the WordPress site, wouldn’t these modules already be installed? I mean, I can’t imagine I need a lot of modules for this site to work on Server B which aren’t present in the working installation on Server A? The entirety of a WordPress installation is within the site directory, is it not? That is, everything WordPress related for this site will be in the directory /var/www/mydomain.

    • This reply was modified 2 years, 3 months ago by johnny2r.

    Hi, do you manage the server yourself?
    The modules are server side, if you manage the server you can install every module like this:
    this for example installs php-xml
    apt install php-xml
    or for php-curl:
    apt install php.curl
    If youre using a different php version than default:

    apt install php74-curl
    apt install php74-xml
    • This reply was modified 2 years, 3 months ago by Benedikt Ledl.
    Thread Starter johnny2r

    (@johnny2r)

    Yes, I manage the server myself. I’ll install these modules and report back. Thanks!

    Thread Starter johnny2r

    (@johnny2r)

    All modules were already installed, in fact.

    Please provide your actual domain. That will avoid all the guesswork and allow us to help you arrive at a resolution faster.

    There are a couple of possibilities here:

    1) The Apache mod_rewrite module not installed or not loaded in the running config.

    2) The WordPress rewrite rules not correct or not being processed by Apache.

    3) Whatever is creating the /area/subarea permalink — WordPress? Theme? Plugin? — may be broken or misconfigured.

    Knowing the ACTUAL URL can help us narrow down the possible culprits and help you arrive at a solution faster.

    If you absolutely cannot share the URL, that’s fine. But then we can only continue with the guessing game.

    Standing by.

    Thread Starter johnny2r

    (@johnny2r)

    I have got to the bottom of this now. It was nothing to do with WordPress as such, but to do with an incorrectly figured virtual host preventing mod_rewrite from working, combined with the fact that the headers module was not loaded.

    Apart from not working with WordPress, I don’t usually work with Apache either, pretty well always using nginx instead, so this has been a bit of a learning curve for me. Thanks for the help, all.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Absolute beginner rewrite question’ is closed to new replies.