0

I managed to enter a wrong Site Address (URL) on the General Settings page and now I can't even visit the website. I'm doing this on OpenShift/RedHat.

How do I recover?

settings

closed as off-topic by Pieter Goosen, TheDeadMedic, Mayeenul Islam, Howdy_McGee, Nicolai Nov 19 '15 at 11:42

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?" – Pieter Goosen, TheDeadMedic, Mayeenul Islam, Howdy_McGee, Nicolai
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    If you made a mistake in the DNS, you need to fix at the DNS level, not the WordPress level. Is that what you meant, or did you make an error when creating the WordPress site? – czerspalace Nov 7 '15 at 1:12
  • I made a mistake in Wordpress settings where I accidentely changed the wordpress address – swissnetizen Nov 7 '15 at 7:40
  • See wordpress URL here i.stack.imgur.com/iwNP5.png – swissnetizen Nov 7 '15 at 7:45
  • 1
    When the options are grayed out like that it is sometimes because the site home and address have been defined in the wp-config.php file (root of your wp install). Open that file and look for: define( 'WP_SITEURL', 'http://www.mysitename.com/myblog' ); and define( 'WP_HOME', 'http://www.mysitename.com' ); – Pat Gilmour Nov 7 '15 at 16:26
1

The best way to fix this is to install PHPmyAdmin and then navigate to the wp-options table and change the site-address row.

To install PHPmyAdmin, click on "Browse Marketplace" and search for PHPmyAdmin.

1

@Pat Gilmour is on the right track. The source to handle this is here.

First thing you want to do is open the wp-config.phpfile in your SFTP (secure FTP).

Add these two lines to your wp-config.php, where "example.com" is the correct location of your site.

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

Read that whole page for all the data.

0

Add phpMyAdmin to your application. (it should be under Tools and Support). The phpmyadmin username and password will be the same as the MySQL credentials. Login to phpmyadmin and go to wp_options table ..... Check the rest on WP official url change docs.

phpMyAdmin Enabled

If a scalable application is created, the scaling function of that application cannot be disabled. phpmyadmin-4 cannot be embedded in scalable app

Alternative Method

Or Generate ssh and use filezilla or putty to access your files. Details

For filezilla - File > Site Manager >

  • Hostname = your rhc subdomain
  • Protocol = SFTP
  • Login Type = Key file
  • User = can be found at application page
  • Key file = select .ppk file which you generated by puttygen

After connect go to the following path and modify wp-config.php

/var/lib/openshift/*username*/app-root/data/current

Enjoy

  • 2
    Welcome to WordPress Development. Please extend your answer and explain how it solves the problem. Thanks – birgire Nov 7 '15 at 21:05
  • Hi @birgire, i've edited the answer. Hope this will work better. – Sam Nov 10 '15 at 20:26
  • good effort and great you took the time to update your answer, It would be nice to have a little bit more detail on what do to in the wp_options table and what to do in the wp-config.php file. – birgire Nov 11 '15 at 9:11
  • I think what to do is already described in the above answers and I stated to check wp official url change docs. I was actually describing what is difficult part. – Sam Nov 11 '15 at 17:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.