Support » Fixing WordPress » wp-config mistake and now, can’t access anything (incld ftp)

  • Resolved vinaykn

    (@vinaykn)


    Using the File manager plugin, I accidentally added my website name ‘wellwithmaple.com’ to
    WP_HOME & WP_SITEURL. So due to that, my wordpress URL is now resolving to the wrong URL

    Now, I’m unable to login to my dashboard to overwrite the wp-config file.

    I’m trying the FTP using Filezilla but I’m unable to connect to the server. I’m using Amazon Lightsail as the hosting platform. That server is running, but even when testing using https://ftptest.net, its saying Connection refused.

    I’ve turned down my firewall and have gone through network configuration wizard of filezilla but can’t connect. My question is this

    1. Is there some way i can replace my wp-config file?
    2. Any way to revert the whole thing and restart my fresh wordpress configuration?

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Can you get to your hosting control panel?

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Moved to Fixing WordPress, this is not a Installing WordPress topic. Also I’ve adjusted the title, don’t put URGENT in the titles. Like you we’re all volunteers. 😉

    Give this a read.

    https://kinsta.com/knowledgebase/change-wordpress-url/

    The first method won’t work (you need dashboard and your site is sending you to the wrong place). As a work around, the second option will work.

    https://kinsta.com/knowledgebase/change-wordpress-url/#wordpress-url-wp-config

    But that’s temporary and will block you from making the change in your dashboard. It will bring your site back.

    Give the third option a read, that’s really the way to fix it for good.

    • This reply was modified 4 months, 3 weeks ago by Jan Dembowski.

    @acstudent Hi – yes, I can access my hosting panel. I’m using Amazon Lightsail to host my website.

    @jdembowski – Thanks Jan. Reason I put urgent was letting everyone know that this was time pressured. Will be vary of that 🙂

    So, as I’ve mentioned, I’m unable to either FTP or access the wordpress panel. So how can I update the wp-config file? and again, how can I update the phpMyadmin too? Kindly help.

    Thanks!

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Your site is accessible via SSH and (hopefully) you can use a client like WinSCP for the PC or Cyberduck for the Mac.

    https://winscp.net/eng/index.php
    https://cyberduck.io/

    @jdembowski – I was using Filezilla. I downloaded winscp too but same error – Target machine actively refused connection. There’s something wrong with my FTP connection to server which I’m unable to figure.

    I have an SSH terminal via Amazon Lightsail but I don’t know the command to overwrite or revert, or just simply replace the wp-config file.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Don’t use FTP protocol. It will never work and only insane hosts even provide that.

    WinSCP supports SCP and SFTP (which oddly are different sub-sets of SSH and not the same thing… but never mind that now) and should work. I am not familiar with Filezilla but if you try to FTP (port 21 and 20 horrible protocol) then it will never work.

    If you use SCP/SSH (port 22) then it should work fine.

    I’m getting error ‘No supported authentication methods available (server sent publickey)’. I know I’m entering the correct username and password.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    OK, THAT’S not a bad error message. 😉

    Does your Amazon hosting use pubkey (with a password I hope) for authentication? If so then they need that for your SCP/SSH client too.

    If that’s the case and you’re using WinSCP (which I use) then give this a a read.

    https://winscp.net/eng/docs/guide_public_key

    If there’s no pubkey then you may need to contact Amazon Lightsail for support.

    Edit: This may help too.

    https://winscp.net/eng/docs/guide_amazon_ec2

    • This reply was modified 4 months, 3 weeks ago by Jan Dembowski.

    @jdembowski – Thank you so much! Was able to FTP in and fix it using the public key. I owe you!

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    You’re welcome. I’m glad it worked out. 😉

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.