• I’ve been asked to install Catablog on an existing live WordPress site. What’s the best way to develop, without affecting the live site?

Viewing 15 replies - 16 through 30 (of 32 total)
  • Go to http://localhost/phpmyadmin in your browser. That will take you to the phpMyAdmin screen, which lets you administer your databases. Create a new database and then click on it when it appears in the left sidebar. Then click on the import tab and import the .sql file from your CD.

    I believe that mysql’s default user is “root” with no password on XAMPP, but you can always create your own under the Privileges tab.

    Thread Starter WebDev22

    (@webdev22)

    Thanks for the replies. I’m in phpmyadmin and am on my way to creating the new database, but see a drop-down menu that defaults to ‘Collation’. Is there a selection in particular I should select? This is the drop-down right next to the Create button.

    Just enter the database name accept the defaults!

    David

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Great instructions David! Tempts me to make another instance on localhost.

    Thread Starter WebDev22

    (@webdev22)

    Okay. I imported the sql file into phpmyadmin and can see the site in the localhost. However, it’s displaying using a different theme. When I go to http://localhost/mysite/wp-login.php, and can’t log in, it takes me to the live login page. Actually, all links take you to the live site.

    Thread Starter WebDev22

    (@webdev22)

    I noticed a table called ‘wp_options’ with a field called ‘siteurl’. I changed the value to reflect the localhost URL, but there was no change.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Your database was in a .sql text file, right? In your favorite text editor (notepad works, notepad++ is what I use) do a search and replace in a copy of that text file.

    You want to replace the http://the-original-url/ with http://localhost/ and then re-import that file into your XAMP MySQL again. You will lose any DB changes you’ve already made but that should fix all the URL references.

    Thread Starter WebDev22

    (@webdev22)

    Thanks, Jan. I made the change and imported, but even though the URLs are correct with the localhost address, I’m getting a bunch of 404’s, except for the home page. Could this be a configuration issue?

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    I’m getting a bunch of 404’s, except for the home page. Could this be a configuration issue?

    Almost completely there! The permalinks need to be reset, that will wrote the .htaccess file.

    Visit http://localhost/wp-admin/options-permalink.php and click on Save changes. If mod_rewrite is part of XAMP then that should do the trick.

    Thread Starter WebDev22

    (@webdev22)

    When I went to that page, I got five radio buttons, with the last one selected by default. It has a text field that reads /%postname%/. Underneath, there’s an options area that I just ignored. I clicked ‘Save Changes’ and the URLs appear correct now. Thanks.

    However, there a bunch of missing elements on the page, including a missing top navigation, and missing images. Not all images are missing though. Any idea what could be causing that?

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    In the dashboard or the actual blog? If it’s the dashboard, try downloading and copying the WordPress files on top of your installation.

    As long as the site has not modified any core files or themes that ship with the core files (Twenty Eleven) then that won’t hurt anything and may restore the missing images.

    If it’s on the blog portion then you may not have a complete backup of all the files and images.

    Thread Starter WebDev22

    (@webdev22)

    Yes, it’s on the blog portion. The admin seems fine.

    is the media path set up appropriately in settings->media?

    Moderator cubecolour

    (@numeeja)

    It could be that when you did a search & replace on the database backup as a text file, anything that was stored as serialized data got lost due to the real site’s domain URL and the local URL not having the name number of characters. Two ways around that:

    Either:
    1. use a local address with the same number of characters as the real site and do the search & replace on the text file as before – so if the real site is “http://www.thisistheurl.com” make the local site: “http://www.thisistheurl.loc” and add a rule to the PC’s hosts file to point that domain at 127.0. 0 1 so the PC doesn’t go off to a dns server look up for a non-existent address.

    Or:
    2. restore the original db backup from the real site to the local site and run the interconnect/it search & replace tool: http://interconnectit.com/124/search-and-replace-for-wordpress-databases/

    The first is a tip I picked up from Mike Little at WordCamp Portsmouth this year, the second is a bit more fiddly, but you can call your local site whatever you like.

    Thread Starter WebDev22

    (@webdev22)

    I didn’t see anything out of order under settings -> media. Both ‘Uploading Files’ fields are blank. I’m looking into cubecolour’s suggestions.

Viewing 15 replies - 16 through 30 (of 32 total)

The topic ‘Developing on live WordPress site’ is closed to new replies.