Support » Fixing WordPress » URL change instructions didn't work

  • I do not know off hand the wordpress version we are using. We are up to date, but not using beta.

    I created a wordpress site as a subdirectory. We were able to keep our original site through processwire (chagrinfallspark.org) while I created and built a new site (the url WAS chagrinfallspark.org/wordpress). i got frustrated yesterday and made a dumb move.

    I went to the wordpress site dashboard-general-settings and changed the wordpress url to our processwire site. That left the wordpress site displaying a 500 internal error. I then went (through much reading on wordpress articles) into the wordpress folder and posted a new .htaccess file. The 500 error is gone, but this has created a loop back to the original site. I can no longer access the newly created wordpress site. So now the http://www.chagrinfallspark.org/wordpress site just kicks me back to the processwire site.

    I am posting because the http://codex.wordpress.org/Changing_The_Site_URL hasn’t been working. I tried editing the config file, adding the code into the functions.php of the active theme, and went into the SQL database and changed the site and home to chagrinfallspark.org/wordpress. But nothing is working. Can anyone help me?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Those instructions do work. I’ve used them many times myself (the functions.php method).

    Thread Starter jonboxer

    (@jonboxer)

    Am I doing it wrong? This is what the code looks like that I paste into the existing php file

    I go to public_html–>wordpress–>wp-content–>themes–>zeebusiness

    Zeebusiness is my current active theme (confirmed via the sql)

    Here is the very beginning of my code. Does this look right?:
    <?php
    update_option(‘siteurl’,’http://chagrinfallspark.org/wordpressm&#8217;);
    update_option(‘home’,’http://chagrinfallspark.org/wordpress&#8217;);
    ?>
    // Set Content Width
    if ( ! isset( $content_width ) )
    $content_width = 480;

    /*==================================== THEME SETUP ====================================*/

    Assuming that is the theme’s function.php file that you are editing,. it looks correct. Did you remember to remove the lines you added to the wp-config.php file first?

    Thread Starter jonboxer

    (@jonboxer)

    There are no lines in the wp-config.php

    It reads:
    <?php

    /**
    * The base configurations of the WordPress.
    *
    * This file has the following configurations: MySQL settings, Table Prefix,
    * Secret Keys, WordPress Language, and ABSPATH. You can find more information

    Okay. We use ipower and i went into the file manager, edited the code of functions.php as shown in my previous post. But it still won’t activate the wordpress site. When you go to chagrinfallspark.org/wordpress it still is kicking me back to the processwire site.

    this is what i have been dealing with. What am i doing wrong/missing?

    In your first post you said:

    I tried editing the config file

    Have you removed the lines you added?

    Thread Starter jonboxer

    (@jonboxer)

    The wp-config file is back to normal. No additional lines from me.

    Looks like there’s an .htaccess file from your old site at the root of your domain that is redirecting everything to http://chagrinfallspark.org/home/

    Thread Starter jonboxer

    (@jonboxer)

    There are two .htaccess files. One in the root directory that says this:

    DirectoryIndex index.html index.htm index.php
    
    ErrorDocument 404 "The requested file robots.txt was not found.
    
    Options +FollowSymLinks -Indexes
    
    #######################################################################
    # START PROCESSWIRE HTACCESS DIRECTIVES
    # @version 2.2
    #######################################################################
     -----------------------------------------------------------------------
    # Don't show directory indexes, but do follow symbolic links
    # -----------------------------------------------------------------------
    # -----------------------------------------------------------------------
    # Let ProcessWire handle 404s
    # -----------------------------------------------------------------------
    # -----------------------------------------------------------------------
    # Handle request for missing favicon.ico/robots.txt files (no ending quote for Apache 1.3)
    # -----------------------------------------------------------------------
    <Files favicon.ico>
    </Files>
    <Files robots.txt>
    </Files>
    # -----------------------------------------------------------------------
    # Protect ProcessWire system files (part 1)
    # -----------------------------------------------------------------------
    <FilesMatch "\.(inc|info|module|sh|sql)$|^(\..*)$">
      Order allow,deny
    </FilesMatch>
    # -----------------------------------------------------------------------
    # Override a few PHP settings that can't be changed at runtime (not required)
    # -----------------------------------------------------------------------
    <IfModule mod_php5.c>
      php_flag magic_quotes_gpc		off
      php_flag magic_quotes_sybase		off
      php_flag register_globals		off
    </IfModule>
    # -----------------------------------------------------------------------
    # Set default directory index files
    # -----------------------------------------------------------------------
    # -----------------------------------------------------------------------
    # ProcessWire requires mod_rewrite
    # -----------------------------------------------------------------------
    <IfModule mod_rewrite.c>
      RewriteEngine On
      # -----------------------------------------------------------------------
      # Set an environment variable so the installer can detect that mod_rewrite is active.
      # -----------------------------------------------------------------------
      SetEnv HTTP_MOD_REWRITE On
      # -----------------------------------------------------------------------
      # Optional: Set a rewrite base if rewrites aern't working properly on your server.
      # And if your site directory starts with a "~" you will most likely have to use this.
      # -----------------------------------------------------------------------
      # RewriteBase /
      # RewriteBase /pw/
      # RewriteBase /~user/
      # -----------------------------------------------------------------------
      # Access Restrictions: Keep web users out of dirs that begin with a period
      # -----------------------------------------------------------------------
      RewriteRule "(^|/)\." - [F]
      # -----------------------------------------------------------------------
      # Optional: Redirect users to the 'www.' version of the site (uncomment to enable).
      # For example: http://processwire.com/ would be redirected to http://www.processwire.com/
      # -----------------------------------------------------------------------
      # RewriteCond %{HTTP_HOST} !^www\. [NC]
      # RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
      # -----------------------------------------------------------------------
      # Access Restrictions: Protect ProcessWire system files (part 2)
      # -----------------------------------------------------------------------
      RewriteCond %{REQUEST_URI} (^|/)\.htaccess$ [NC,OR]
      RewriteCond %{REQUEST_URI} (^|/)(site|site-[^/]+)/assets/(cache|logs|backups|sessions|config|install)($|/.*$) [OR]
      RewriteCond %{REQUEST_URI} (^|/)(site|site-[^/]+)/install($|/.*$) [OR]
      RewriteCond %{REQUEST_URI} (^|/)(wire|site|site-[^/]+)/(config|index\.config|config-dev)\.php$ [OR]
      RewriteCond %{REQUEST_URI} (^|/)(wire|site|site-[^/]+)/templates-admin($|/|/.*\.(php|html?|tpl|inc))$ [OR]
      RewriteCond %{REQUEST_URI} (^|/)(site|site-[^/]+)/templates($|/|/.*\.(php|html?|tpl|inc))$ [OR]
      RewriteCond %{REQUEST_URI} (^|/)(site|site-[^/]+)/assets($|/|/.*\.php)$ [OR]
      RewriteCond %{REQUEST_URI} (^|/)wire/(core|modules)/.*\.(php|inc|tpl|module)$ [OR]
      RewriteCond %{REQUEST_URI} (^|/)(site|site-[^/]+)/modules/.*\.(php|inc|tpl|module)$ [OR]
      RewriteCond %{REQUEST_URI} (^|/)(COPYRIGHT|INSTALL|README|htaccess)\.txt$ [OR]
      RewriteCond %{REQUEST_URI} (^|/)site-default/
      RewriteRule ^.*$ - [F,L]
      # -----------------------------------------------------------------------
      # Ensure that the URL follows the name-format specification required by ProcessWire
      # -----------------------------------------------------------------------
      RewriteCond %{REQUEST_URI} "^/~?[-_.a-zA-Z0-9/]*$"
      # -----------------------------------------------------------------------
      # If the request is for a file or directory that physically exists on the server,
      # then don't give control to ProcessWire, and instead load the file
      # -----------------------------------------------------------------------
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !(favicon\.ico|robots\.txt)
      # -----------------------------------------------------------------------
      # Optional: Don't send missing image requests to ProcessWire (uncomment below to enable).
      # This might be helpful if you are launching a new site and lots of images have moved.
      # It will reduce the load on the server not to have ProcessWire trying to serve those requests.
      # -----------------------------------------------------------------------
      # RewriteCond %{REQUEST_URI} !\.(gif|jpg|png|ico)$ [NC]
      # -----------------------------------------------------------------------
      # Pass control to ProcessWire if all the above directives allow us to this point.
      # For regular VirtualHosts (most installs)
      # -----------------------------------------------------------------------
      RewriteRule ^(.*)$ index.php?it=$1 [L,QSA]
      # -----------------------------------------------------------------------
      # If using VirtualDocumentRoot: comment out the one above and use this one instead.
      # -----------------------------------------------------------------------
      # RewriteRule ^(.*)$ /index.php?it=$1 [L,QSA]
    </IfModule>
    #######################################################################
    # END PROCESSWIRE HTACCESS DIRECTIVES
    #######################################################################
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    The other in the subdirectory called wordpress that says this:

    # BEGIN WordPress
     <IfModule mod_rewrite.c>
     RewriteEngine On
     RewriteBase /
     RewriteRule ^index\.php$ � [L]
     RewriteCond %{REQUEST_FILENAME} !-f
     RewriteCond %{REQUEST_FILENAME} !-d
     RewriteRule . /index.php [L]
     </IfModule>
    
    # END WordPress

    They look the same to me. Am I looking in the right places? any ideas?

    And THANK YOU THANK YOU THANK YOU for this individualized help! I could not do it without you.

    Thread Starter jonboxer

    (@jonboxer)

    Okay. I just noticed the problem in the second one and changed it to be reflective of the end of the first. Got rid of the question mark sign and changed it to a dash. Now i get a 500 internal error.

    Thread Starter jonboxer

    (@jonboxer)

    Any help? Anyone?

    Thread Starter jonboxer

    (@jonboxer)

    #modlook
    Is it possible to delete my htaccess code posting from 3 days ago? It contains information that I think is sensitive.

    Thanking you in advance

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    We do not delete information from this site unless it actually is sensitive or dangerous in some manner. I do not see anything in your .htaccess code that is potentially dangerous, like passwords or the like.

    Even if we did delete it, Google already has it cached. This site is well indexed. Information posted here cannot be removed entirely.

    If you don’t want it public, don’t post it in the first place.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘URL change instructions didn't work’ is closed to new replies.