• Resolved okieman

    (@okieman)


    We have a very small site that took about two weeks to build. Client often not available for revisions. The last step was to change the DNS and two URLs in Settings>General (WordPress and Site addresses). Somehow before that process was complete I went over to check things in another browser tab, and when I came back to WP Admin, I could no longer reach the login page. Whatever I entered in the address bar would automatically switch to the second link below plus a standard “Sorry” error page cgi-sys/defaultwebpage.cgi. Alarming because I was asked to temporarily stop working on the site and complete a distracting admin task, and did not do the first backup once the site was finalized.

    Neither of these work…
    #1 development link
    test.devservername.com/clientname.com/wp-admin/
    #2 final link
    clientname.com/wp-admin/
    (manager doesn’t want public links)

    The next morning I came in and researched other ways to make sure both the internal URLs are changed. WP codex suggested FTP to change wp-config.php. While in FTP I noticed functions.php and wp-config had odd code errors. Not normal typos. At the same time I realized FileZilla was not showing the most recent version of the target site unless I kept doing F5. (so re-installed it) I realized I may have messed up a config file in the confusion over where I was or was not uploading files. So I downloaded each one and this time made sure they were kosher. Also did a full FTP backup to my hard drive, then replaced the wp-admin and wp-includes directories. Also uploaded the most recent version of my theme, and that the theme child files were OK. The wp_options table looks OK. Tried disabling plugins.

    I can now get a version of the home page to load, but the CSS is missing (https://imgur.com/a/WzsXi) and none of the navigation links work. The source code doesn’t show any obvious problems. It’s like WP forgot how to load the stylesheets and provide functioning links.

    *Never* had such serious problems. Especially on a simple site. Can an experienced debugger suggest a logical next step? Will discuss, then implement ideas on Monday.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Changing DNS can sometimes take a while to propagate. Otherwise I would say check your wp-config file for proper DB settings. This is a tough one with such little information.

    You can revert the settings changes you mad on site address and wordpress address by adding lines like these to your wp-config.php:

    define('WP_HOME','http://example.com');
    define('WP_SITEURL','http://example.com');

    Then you need to go through the “moving WordPress” procedures detailed here:
    http://codex.wordpress.org/Moving_WordPress

    Signed on with my work login now, but I’m the post author.

    @rossmitchell Tried your suggestion, plus this …

    define('WP_HOME','http://'. $_SERVER['SERVER_NAME']);
    define('WP_SITEURL','http://'. $_SERVER['SERVER_NAME']);

    BUT download the wp-config I just uploaded, noticed the contents are completely garbled. Tested this several times. As soon as I FTP a fresh version of the wp-config file, then download, it’s been converted to gibberish. Only the leading <?php looks normal.

    Started fresh new wp-config and replaced the unique Keys and Salts, and added this…
    define( 'WP_ALLOW_REPAIR', true );

    No more garbling, but I still have the plain ugly page when I hit the URL for the site.

    Thoughts?

    PS just got this back…

    Database repair results
    
    The wp_users table is okay.
    
    The wp_usermeta table is okay.
    
    The wp_posts table is okay.
    
    The wp_comments table is okay.
    
    The wp_links table is okay.
    
    The wp_options table is okay.
    
    The wp_postmeta table is okay.
    
    The wp_terms table is okay.
    
    The wp_term_taxonomy table is okay.
    
    The wp_term_relationships table is okay.
    
    The wp_termmeta table is okay.
    
    The wp_commentmeta table is okay.
    
    Repairs complete. Please remove the following line from wp-config.php to prevent this page from being used by unauthorized users.
    
    define('WP_ALLOW_REPAIR', true);

    @mr-case @rossmitchell
    OK site is now 90% restored. The only lingering problem is that the home page will not load and goes to cgi-sys/defaultwebpage.cgi instead. Everything looks fine in Admin/Pages. Reset permalinks x2 and also switched between Plain and Post Name. And tinkered with various redirect plugins.

    But I can see the homepage when inside Admin/Appearance/Customize

    I think you should be getting everything to work with the dev settings such as:
    “test.devservername.com”
    and putting the server’s IP address in the site and wordpress address, this will give you a solid point of departure.
    Evaluating the server address once at page / post / image etc creation time then saving it as part of the item’s valid identity and expecting that address to work subsequently from other network origins is going to stuff the database with relic addresses.
    Once you have the website working again, then go through the moving WordPress procedures, then move the site, then install the “broken link check” plugin, disconnect your server from the internet and check that you have no broken links.

    Thank you sir. I will report back.

    Research indicates the re-direct to default cgi can be stored in the users’ browser or with the ISP. They suggested testing with a VPN connection. When I did that, the home page loaded normally.

    One source suggested the following, but it has no effect on non-VPN browsers that retrieve defaultwebpage.cgi …

    <IfModule mod_rewrite.c>
    Options -ExecCGI
    </IfModule>
    • This reply was modified 8 years, 2 months ago by lukefive.

    To minimize disrupting the user experience, I found a locally-cached (on an iPhone) version of the home page. I dumped that HTML into index.html and uploaded via FTP. Then I changed my .htaccess to point to this new index file instead of index.php. (Since all attempts to load index.php result in defaultwebpage.cgi.) Then I created a custom “Home” link on the primary menu that points to index.htm.

    After several days, I expect to be able to restore the normal setup.

    Greatly appreciate the advice in this forum. Hope this helps other developers.

    Thread Starter okieman

    (@okieman)

    Since the remainder of this problem is not WP-centric, I am closing this thread. Thanks to responders!!

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Site did work, now CSS missing and links broken’ is closed to new replies.