Forum Replies Created

Viewing 15 replies - 196 through 210 (of 1,808 total)
  • carnifex08, you can use the Interconnect it tool either from the command line or in your web browser. It sounds to me that either you don’t have PHP enabled in your localhost install or that it’s not on your path.

    To use it in your browser, simply invoke it like http://localhost/wordpress-folder/search-replace-folder-name. I use Xampp, my WordPress is installed in a folder named htdocs\wordpress. My Search-Replace is under a folder called srdb in the htdocs folder. So I would invoke it as:
    http://localhost/srdb The interface is pretty straightforward.

    To invoke wp-cli is a bit more tricky. In windows, it involves making a batch file in your favorite text editor (make sure it’s not a word processor) & name it wp.bat. Make certain it doesn’t have a .bat.txt extension, as Notepad is notorious for adding the .txt extension on if you forget to go to the ‘files of type’ part of the dialog box when saving a file. Here’s what mine looks like.
    @echo OFF
    d:\xampp\php\php wp-cli.phar %*
    & it’s run from the wordpress folder.

    Let us know if you have additional questions, & welcome to the WordPress web developer community.

    I actually seriously doubt that was the cause, Ben. I’m wondering if the source of the problem might be the commentluv plugin, ie, it’s blacklisting some of the folks leaving comments. I really don’t know w/o seeing an exact error message. Anyway, if the problem crops up again don’t hesitate to reopen this. I’ll keep my subscription to the thread open for awhile just in case.

    1 thing you might wish to consider if you haven’t already done so is to join Google Search Console (www.google.com/webmastertools. Particularly check both the security tab & the ‘Search Traffic > Manual’ tab to see if they are noticing anything.

    Hello, carnifex08, & welcome. Yeah, this is *always* fun times when stuff like this happens (not!!!).

    The first thing which you should likely do is to replace the url’s in your database. There are a couple tools you can use to do this. The first is the ever-popular wp-cli, available at:
    https://wp-cli.org/

    A 2nd tool is Search-replace by Interconnect It, available from:
    https://github.com/interconnectit/Search-Replace-DB/archive/master.zip

    either tool should help. You should likely back up your database, just in case you screw the search-&-replace up. That way, you can go back to a known, albeit not actually good, copy. Because the database contains something called “serialized data”, you do need a specialized tool to do a search & replace.

    Your other option is to export your posts. You can use the WordPress Importer plugin to do that, &, indeed, WP-Cli requires it to be in place, while the Interconnect It tool does not. This exports files to .xml, on which a search-&-replace using standard text editing tools can be performed. Don’t use a word processor on this–use something like Notepad, etc. The disadvantage of this method is that other tables besides posts & postmeta will not be affected.

    Good luck. This is almost always a hassle.

    Hello, Ben, & welcome.

    Because you don’t copy the entire error message to your query, it makes it rather hard. I do understand that may be difficult to do when copying from the phone to the computer. Having thus said, an exact copy of the error would be helpful.

    Would it be possible to show us your .htaccess file or the equivalent if using Nginx? This is a hidden file, so you’ll need to enable the option to view those either in your hosting provider’s file manager or an FTP client. Let us know if you’re unsure how to do that, stating either who your hosting provider is or what ftp client you use so we can assist further.

    I’m noting some problems w/your DNS, & I also note that your site does not appear to have an SSL certificate, which is rather frowned upon now.

    Lastly, what plugins are you running?

    I think I’ve asked more than enough questions & provided absolutely no answers for now, for which I apologize, but going off half-cocked is generally not a great idea either. Hopefully the answers to my queries will allow me to go off fully cocked instead.

    So you’re telling me that the 2 wp-config.php files have the same hostname, is that correct?

    You have a different database name & username for both gsnetworks & newwp, right?

    1 weird thing I’ve found is that sometimes when I create a user for a database, I have to go back in & “change” the password in the control panel (even though it wasn’t wrong, save the changes, & then the database connection works. Please do not ask me why. It’s just 1 of those inexplicable things. You might try it.

    Ron, please open your public_html/wp-config.php. Please ensure that the hostname is the same name as in newwp/config.php. It may be localhost–it may be something else–but the names should likely match.

    So basically, public_html is gsnetworks.ca. gsnetworks.ca/wp-admin is the dashboard of your primary website. Do not disable, please. Pretty please.

    When I go to gsnetworks/newwp/wp-admin it gives me the following:
    “Error establishing a database connection
    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at sql5c9b.megasqlservers.com. This could mean your host’s database server is down.
    • Are you sure you have the correct username and password?
    • Are you sure that you have typed the correct hostname?
    • Are you sure that the database server is running?
    If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.”

    So I am assuming you went to public_html/newwp/wp-config & entered the values for the database you created into that file. Next, what does your control panel say about database hostname?

    Capt. Ron, this is hard because I don’t know how your hosting provider works, & there are no standards (blah!).

    The way I do stuff is this. Your control panel username is usually some form of the domain name. So, for the halibut, let’s just say that you’re hosting on my server & that your control panel username was gsnetworks. Now let’s say you created a database called gsn & user named gsn & a password of 123Pass! (if you do, I will personally seek you out & beat you silly w/a wet noodle, & do not think that because I can’t see I can’t or won’t do so lol). Your database name would look like gsnetworks_gsn & your username would actually look like gsnetworks_gsn as well. The reason we do that is simple, actually. Let’s say I have a hundred clients on my server & each wants to use a database name of wrdp1. You can’t have 2 databases w/the same name. So by prefixing the database name w/the client’s control panel username, it eliminates the problem. Have you been putting your control panel username in front of your database name & your database username? I’m not 100% certain that’s how your hosting provider does stuff, but if you haven’t been doing this & things are not working as you expect, then maybe give that a try?

    No. Just type http://www.gsnetworks.ca/newwp/wp-admin
    after you’ve gotten the database details correct, of course.

    Use your ftp client or your hosting provider’s file manager to view the folder tree, Capt. Ron. What ftp client do you use?

    When I realized I’d been stupid (or, perhaps more accurately), tired enough that I’d replied to the email instead of to the post, I went over to the forum & replied that way. I thought the email would end up in someone’s cyberbin somewhere, because it said it was a “noreply” address, which usually means if you do reply there, it’s forever lost in cyberspace.

    Trace your server down the folder tree. So if you installed WordPress to a folder called wordpress, then the way to get into the dashboard is:
    http://www.gsnetworks.ca/wordpress/wp-admin. gsnetworks is the top level. The lowest is wp-admin. Insert any folders you used there in between, & you’re golden. The newwp install is still getting a database error, so I assume you chose not to change the wp-config.php file in its folder to reflect the new database you created.

    My son & grandson arrived here from TX today, so I will be in & out (& mostly out), for the next several days, as our Thanksgiving holiday is Thursday here in the States. But I will try to help as I’m able.

    That tends to be theme dependent. Try searching for a theme w/a “full width header”.

    Ron, interestingly, I basically had to do for this compromised site what I’m suggesting you do here. Maybe print this out & use this as a checklist. I even put little circles where you can put a checkmark :).
    () Create a new database, user, & password.
    () Make certain the user was added to the database & had all privileges.
    () Copy the database name, user name, & password down for later.
    () Run the ‘Export’ tool (‘Tools > Export’) on the old site & saved the file to your computer. I suggest leaving all defaults regarding the Export tool as they are.
    () Open the new wp-config.php & enter the new values.
    () Runn the ‘Import’ tool on the new site (‘Tools > Import’).
    () Copy the uploads folder over.

    At this point I installed a plugin called “Add from Server” & imported the files into the media library. You may wish to do likewise.

    It sounds a lot quicker than it is, but those are the basic steps. The biggest hassle was the media library import, which actually isn’t strictly necessary, although it is helpful. At this point the site is fully functional. Installation of a security plugin & any other plugins you require for your functionality tops off the work.

    See if that’s sufficient guidance to point you in the right direction.

    So, Ron, please log into your hosting provider’s control panel. There should be a section for databases, & then under that a place to create 1. Click that, please. You’ll be defining 3 things:
    * A database name;
    * A username to be associated w/that database; &
    * A password for that username. That user isn’t a real person. It’s sort of a figment of the computer’s imagination, but, be that as it may, these things must be defined. The user needs to have all privileges on that database. The wizard should guide you step-by-step through the process. Copy down the database name, username, password, & hostname if it’s anything other than localhost. These values will be entered into your wp-config.php in the newwp folder.

    Make sense?

    Now–I’ve got a client who just moved her recently hacked site over to my server. I fixed the compromise, but it looks as though there may be some database corruption issues. I need to go investigate that–like the old Simon & Garfunkel song says: “just tryin’ to keep my customers satisfied”–& the lights on & doors open. I’ll be back when I get her situation resolved. Hopefully quickly. I’m not trying to abandon you, but…

    Capt. Ron, do you know how to log into your hosting provider’s control panel?

Viewing 15 replies - 196 through 210 (of 1,808 total)