• Resolved addinall

    (@addinall)


    Hi, new here. I haven’t used WordPress before, but have written my own CMS (Chameleon) and used JOOMLA! and Drupal over the years. Used lots of PHP and mySQL, and I know to RTFM! I just did a major search for this issue but can’t seem to resolve it myself.

    I just inherited a partly finished WordPress site. The origional programmer got bored and went on holiday. So…

    I downloaded WordPress on one of my Windows development machines. Work like a charm.

    I went over to the current site and zipped up the entire public www area so as not to miss anything. Unpacked it under my WAMP document root.

    Changed the config.php file to reflect my database user, password, domain etc.

    Used phpMyAdmin on the current site and did a full SQL export.

    I imported it as is and it failed all over the place, so I figured the URLs were wrong. After a bit of a search I found out that locations are stored in the database as literals, rather than using PHP constants and the like.

    So, I opened the SQL dump with vi() and….

    :%s/theolddomain.com/localhost\/wp/g

    223 substitutions.

    Now it ALMOST works. The index page comes up correctly (without images, I can probably figure that out). One of the links on the page points to what-now from a built link on the index page.

    On the old (and still working site) I position the cursor over the link and reports (the browser) that the jump is going to be to

    https://theolddomain.com/what-now/

    On the WAMP server, doing the same thing reports:

    https://localhost/wp/what-now

    On the WAMP server, selecting this gives me a URL not found error. Strangely enough, because it doesn’t exist. It doesn’t exist on the working site either, so back into the database with vi() and I find

    ‘what-now’, ”, ”, ‘2009-11-07 22:17:29’, ‘2009-11-07 12:17:29’, ”, 0, ‘https://localhost/wp/?p=71’, 0, ‘post’, ”, 0),

    As it turns out, this data rows has the id of 71 and it contains the content that should be being displayed.

    As part of a row record, so I figure that the _REQUEST ?p=71 means something to WordPress that I haven’t got right.

    Any ideas on how to get this to work? I just came to a screeching HALT!

    Q2. How do I reset a WordPress admin password? It was never written anywhere.

    Q3. General question, I’ll look for it on this site. But is it common for WordPress developers to code on a development machine then publish up to a live server? This seems to be an awful lot of work to change machines/domains. Am I missing something VERY BASIC? ??

    Cheers,
    Mark.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Q1. look at Moving WordPress and use https://www.ads-software.com/extend/plugins/search-and-replace/ to replace references to old domain with new domain

    Q2. See Resetting Your Password

    Q3. That’s one good way to do it. Also could install WordPress in a subfolder on your live server so access at mydomain.com/blog. Then when ready to go live and to make WordPress available at https://mydomain.com just change in Settings->General, the Blog address (URL) to https://mydomain.com and put this index.php file in your web-root folder (it is the same folder that contains the blog folder)

    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', true);
    require('./blog/wp-blog-header.php');
    ?>

    Then update your permalinks in Settings->Permalinks. for example, then put

    Thread Starter addinall

    (@addinall)

    Fixed the password using SQL. Ta.

    Thread Starter addinall

    (@addinall)

    Thanks MichealH.

    I got everything to work except one arbitory text widget that refused to display for some reason. I found it in the database, copied the HTML out of the record, then I re-added the widget to the right-bar and it worked??? I will compare the working one with the none working one. I have a feeling I may have lost or added a charecter on the transfers.

    I changed all the perma links to localhost. This will work when I send it back up to a live server. Same as Chameleon, JOOMLA! or Drupal. Not sure why arbitary literals where used in the database.

    But, all fixed now. Pretty smooth sailing compared to Drupal! ??
    (That’s why I wrote Chameleon ;-))

    Now, to play with the CSS!….

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Moving Server’ is closed to new replies.