Support » Fixing WordPress » Big problem with bad links

  • I’ve really messed up and I just don’t know where to begin trying to fix this problem.
    After creating my site,, a couple of weeks ago, using the Oxygen theme, I wanted to experiment with some different themes.

    I cloned my thericepost folder on my server at Bluehost and played around there with the different themes. I could get to see it online at trp.old was what I named the experimental folder. Everything seemed to work ok, that is, I could experiment with trp.old and look at it online while, at the same time, I could make new posts at

    Then I noticed two problems: first, for people who subscribed to email updates to new posts, the link that was in the email notification went to trp.old instead of to thericepost. That is, the short link at the foot of the email notification, not the link that was in the post’s title, which was accurate.

    In addition, the SEO plugin that lets me send a tweet from the new post page in WP was also generating a link that led to trp.old. Of course these links — in the tweet and in the email, led to an error online because the links’ target was not on trp.old but on

    So I simply deleted the entire trp.old folder from my server. I figured I could experiment some way later.

    Now, however, the email notifications and the tweets are still generating links that try to go to trp.old. Of course if you go to these you get a 404 error. I can deal with the tweets by simply editing the link before I send it — it’s a pain but it works. I can’t do anything about the bad link generated in the email notification.

    Can anyone tell me what’s going on and, more importantly, what I can do to fix this?


Viewing 15 replies - 1 through 15 (of 15 total)
  • esmi


    Forum Moderator

    I cloned my thericepost folder on my server at Bluehost and played around there with the different themes.

    Did you also clone and edit the database appropriately? See Moving_WordPress for the correct way to clone a site.

    Have you tried deleting & re-installing the plugins that are now causing errors?

    Thanks, esmi. I really think that I did clone and edit the db correctly, though I’ll read the Moving_WordPress article for next time.

    I’ll try the idea of deleting and re-installing the plugins right away and report back. Thanks!

    Well, no joy. I did delete and re-install the plugins and that didn’t make any difference. (I’m pretty sure that I did it with the correct plugins and did not miss something. But I can’t be 100% sure.)

    I also went to the SQL databases on the server and got rid of the one I created when I cloned the site.

    But that reference is still in existence somewhere and I need to find it, but I’m afraid that I’m still too new at WP to really know where to look. I guess it could be in some .php file somewhere, but checking them out is a bit beyond me.

    Just had something else happen and I’m hoping that from this message someone might be able to tell me where to go and how to fix the problem discussed above. I was commenting on on one of the posts. When I clicked the button to post the comment, I got the following message:
    The requested URL /trp.old/wp-comments-post.php was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    Apache Server at Port 80
    So even though I had deleted the directory /trp.old/ the site is still using that for various things. Any suggestions for what to do?


    Have you changed your wp-url settings? Here are the basic steps on how to do it:

    You will want to change the default URL for the website when using WordPress’s script.  This is configured when WordPress is installed. You can change this configuration in the database what the default URL is for your WordPress site.

      1)  In the cPanel, choose phpMyAdmin icon and, in left column, choose your WordPress *database.
      2)  Select the wp_options table on the left column.
      3)  Along the top, click the Browse tab.
      4)  There are two records to modify.  Record #1 (siteurl) and #39 (home) (these can vary, but unlikely).  For each, click the pencil icon to edit and change the option value to read the URL that you intend your links to display, such as

    * = If you do not know the database’s name, return to the cPanel and select the File Manager icon.  Navigate to the directory where the WordPress script is installed.  Select the ‘wp-config.php’ file and click the Edit button along the top to view the name.

    bhpress, thank you so much for these detailed instructions. I followed them carefully (it turns out that the home record wasn’t #39, but I found it. In both the site url and home records, the URL was correct. So since I was in there I used the search function on all the records in wp_options and I came up with this in the results:

    SELECT *
    FROM judyand1_wrd3.wp_options
    WHERE (
    CONVERT( option_id
    USING utf8 ) LIKE ‘’
    OR CONVERT( option_name
    USING utf8 ) LIKE ‘’
    OR CONVERT( option_value
    USING utf8 ) LIKE ‘’
    OR CONVERT( autoload
    USING utf8 ) LIKE ‘’
    LIMIT 0 , 30

    Unfortunately (even though it’s probably staring me right in the face) I can’t figure out what record this is in and don’t know where to change it. It’s precisely that that’s the culprit.

    Any suggestions as to where I go to change this?

    Again, thanks so much!

    Ok that is referencing multiple lines in the wp-options table. You will need to find those and remove the trp.old from the back.

    Thanks again, bhpress. So far I was able to find one of the references and change it, but unfortunately that wasn’t the one that’s resulting in the wrong links. Of course I don’t really know what I’m doing there in phpMyAdmin and am searching rather randomly. I’ve been staying in judyand1_wrd3.wp_options but still no joy in finding the other three.

    I guess I’ll just have to stick with it, though I’m running out of ways to search in that I’m just blundering around.

    But it’s a new day, so time to take a new try.

    Thanks again,

    I am a n00b, but could permalinks solve the problem?

    Thanks. I’ve tried playing around with them as much as I can, but if it is the answer I haven’t been able to figure it out yet.

    If it were permalinks you would be able to just go to the permalinks settings page, and click save. That would essentially make sure your .htaccess has the right code so that everything redirects properly. This would actually just be the database settings. You will also need to check the wp_posts table to see what entries there use the old folder.

    Probably the pros would consider it an ugly hack, but you could try to rederict the bad links to the correct ones using the .htaccess file; I’m not knowledgeable enough to tell you what precisely to do, but I used
    RewriteRule author/([^/]+)/?$ http://yourwebsite/forums/users/$1/ [R=301,L]
    to change “href=”http://[yourwebsite]/author/[xyz]”, to

    So you would need to change references to trp.old to whatever they
    should be using this rule.

    I am using a plugin called htaccess control, and the discussion is
    The writer of the plugin seems to be very knowledgeable, terse, and helpful.

    bhpress and Starejosel, thanks for the answers. I’ve been playing around and I’m afraid that I’m just in too deep for what I know to do. I put up a post looking for someone to hire to help me but it was closed down because that type of post isn’t allowed on the forum so I’m looking on the Internet for a consultant.

    Thanks again,

    Hey Martin,

    I tried getting back at you but the email address you provided when contacting me returned an Undelivered Error.

    Please provide a working address or write back using regular email.


    Hi, Antonio,

    Sorry about the bad address, must have been a typo. You can get me at

    martin (at) thericepost (dot) com
    martinrice1 (at) mac (dot) com


Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Big problem with bad links’ is closed to new replies.