WordPress.org

Forums

Unable to preview posts (3 posts)

  1. onemansvievv
    Member
    Posted 2 years ago #

    This topic has many search results.

    However from all my reading, I have still not found a solution. The other day I realized I had jumped the gun and decided to change my domain name. I called my host and the only way to change the name was to purchase another one. Cheap enough, so i did it. That's when everything went wrong. They made all the changes and everything seemed fine. I could login to my wp cp from either domain. Also going to either url resulted in a viewable and functioning site. The only thing I changed were the paths to all my media inside all my posts. Then I logged out. The next morning I couldn't login no matter which url I used. I called support and they said they could fix it. A couple of hours later, nothing had been fixed. I went to wordpress to search the forums and found a couple of posts describing how to change some code via ftp. It worked to get me in. Or maybe it didn't because just as I got back into the cp, I received an email from support stating that the tech had fixed the problem and that he could login and I should be able to as well. He also stated that he had to revert back to the default theme (twenty-ten) and that he also deactivated all my plugins. As soon as I read the email, I refreshed a browser that was viewing the site and the site failed to load. I went into appearance and found that neither themes were activated. I activated the one I prefer (Easel) and the site came back up with all defaults. I reactivated all my plugs and everything looked fine. I went to change a page and found that I "had no permissions to preview drafts". I tried a new test "post" and when I tried to preview it, the result was "file not found" error. The error also stated that should contact "cgiadmin@myhost" to correct the issue.
    I called support back and have heard nothing for perhaps 6 hours. I really feel that the transfer is the issue. But I don't know enough to know for sure.
    Any help would be appreciated.

    Thanks
    Wes

  2. SiteGround
    Member
    Posted 2 years ago #

    Hello Wes,

    The first thing to do is to open your wp-content/themes/the-theme-you're-using/functions.php file. If there is no such file, make a new one and upload it. Then in this file add the following lines:

    <?php
    update_option('siteurl','http://newdomain.com');
    update_option('home','http://newdomain.com');
    ?>

    Then save it and run your website once - newdomain.com. Once you do that, go to newdomain.com/wp-admin and try to login.

    If you still experience issues, go to the main folder of your WordPress installation and open the wp-config.php file. In it, add these options:

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

    Then clear your browser's cache and cookies and try go access your website again. That should do the trick :)

  3. onemansvievv
    Member
    Posted 2 years ago #

    ty yup did that then finally talked to a support guy that new his stuff pointed me to the right arts to read up on changing the domains inside wp...everything worked like a charm. ty

Topic Closed

This topic has been closed to new replies.

About this Topic