Support » Fixing WordPress » Permalinks not working after moving WordPress

  • Hi All

    I have recently moved our website to a new directory on the server. Because of the way it was initially set up, I exported the data from the old website and reimported it into a new install of wordpress, located somewhere else on the server. When I set the permalinks to ‘Post Name’ from ‘Default’ and click on the links I get the following error….

    404 Not Found

    The requested URL /about-us/ was not found on this server.

    Apache/2.2.22 (Ubuntu) Server at Port 80

    This occurs when I create new pages from scratch. Although it works find when I use the default. I have deleted the .htaccess file in the hope that WordPress would recreate but I am still having the same problem.

    The website can be found here

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator t-p


    -Try resetting your custom permalinks back to the default setting and renaming your WordPress .htaccess file. If that works, then try reading Using_Permalinks before setting a custom permalink structure again.
    If clearing your Permalinks does not alleviate the issue, this could be attributed to anything from a web server configuration to a bad WordPress install.

    Thanks t-p I have done all that already (as per my initial post) Does anyone else have any thoughts on this? the .htaccess file is currently empty!

    Moderator t-p


    I have done all that already

    Then, the issue could be attributed to anything from a web server configuration to a bad WordPress install

    I think the problem may be that the site was originally set to be a network and I am now going back to single user version. I have looked at the wp-config.php which is as follows:

    * WordPress’s Debianised default master config file
    * Please do NOT edit and learn how the configuration works in
    * /usr/share/doc/wordpress/README.Debian

    /* Look up a host-specific config file in
    * /etc/wordpress/config-<host>.php or /etc/wordpress/config-<domain>.php
    $debian_server = preg_replace(‘/:.*/’, “”, $_SERVER[‘HTTP_HOST’]);
    $debian_server = preg_replace(“/[^a-zA-Z0-9.\-]/”, “”, $debian_server);
    $debian_file = ‘/etc/wordpress/config-‘.strtolower($debian_server).’.php’;
    /* Main site in case of multisite with subdomains */
    $debian_main_server = preg_replace(“/^[^.]*\./”, “”, $debian_server);
    $debian_main_file = ‘/etc/wordpress/config-‘.strtolower($debian_main_server).’.php’;

    if (file_exists($debian_file)) {
    define(‘DEBIAN_FILE’, $debian_file);
    } elseif (file_exists($debian_main_file)) {
    define(‘DEBIAN_FILE’, $debian_main_file);
    } elseif (file_exists(“/etc/wordpress/config-default.php”)) {
    define(‘DEBIAN_FILE’, “/etc/wordpress/config-default.php”);
    } else {
    header(“HTTP/1.0 404 Not Found”);
    echo “Neither <b>$debian_file</b> nor <b>$debian_main_file</b> could be found.
    Ensure one of them exists, is readable by the webserver and contains the right password/username.”;

    /* Default value for some constants if they have not yet been set
    by the host-specific config files */
    define(‘ABSPATH’, ‘/usr/share/wordpress/’);
    define(‘WP_CORE_UPDATE’, false);
    define(‘WP_ALLOW_MULTISITE’, true);
    define(‘DB_NAME’, ‘wordpress’);
    define(‘DB_USER’, ‘wordpress’);
    define(‘DB_HOST’, ‘localhost’);

    /* Default value for the table_prefix variable so that it doesn’t need to
    be put in every host-specific config file */
    if (!isset($table_prefix)) {
    $table_prefix = ‘wp_’;

    require_once(ABSPATH . ‘wp-settings.php’);

    I obviously need to do something with this file (and probably the SQL database) but I am a little unsure of what I need to do! Your thoughts are very welcome

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Permalinks not working after moving WordPress’ is closed to new replies.