• Resolved Bliss7

    (@bliss7)


    Hmm, I just downloaded a WAMP stack called XAMPP, but I still cannot replicate my blog on my PC…

    I downloaded my blog database and I changed the WP-config.php to be same with the real one online, but still it cant.

    A few issues why may be these below: –>

    My online blog has:

    – database name of “myhostingusername_mydatabasename”
    – username of “myhostingusername_mysqlusername”

    As you can see, these are PREFIXED with my hosting user name.

    As for the localhost, it doesnt have those prefixed usernames. But it can run partially if I just copied the names from the config file like below :

    – database name of “mydatabasename”
    – username of “mysqlusername”

    Now it can run partially, because I think the database has all my real live URLs inside the database. So the WP is always trying to access the live site instead of running under… https://localhost/etc…

    What should I edit in the database copy that I downloaded from my site and (have already imported into PHP MyAdmin)?

    I think it must be something to change the urls in there to reflect https://localhost/foldername..etc

    Do you know how, to replicate your blog on localhost?

    Regards,

    Bliss7

Viewing 15 replies - 1 through 15 (of 15 total)
  • Thread Starter Bliss7

    (@bliss7)

    Have already managed to get my blog working, but there’s a problem, none of the links in the sidebar like archive/recent posts work.

    All I did was change all instances of my old blog url in the database from https://www.myblogname.com to https://localhost/myfoldername

    in a text editor…

    and it works…only for the front or root page. All the archives and recent posts that now are supposed to run with the new path https://localhost/myfoldername/category/postname/…etc

    doesnt seem to work on my blog replica!

    Basically, anything beyond…https://localhost/myfoldername/

    does not work.

    I have enabled /%categories%/%postname%/ in the permalinks for the test blog, and there was no problem with that. Am using XAMPP.

    What is in your wp-options table in the “home” and “site_url” rows? In other words: if you can log in – what are the two URI values in admin > Options > General?

    Thread Starter Bliss7

    (@bliss7)

    The two values are just exactly as I have changed them (when I was changing the database values with text editor) using search and replace.

    It shows https://localhost/myfoldername for both blog url and site url (inside the WP-Options).

    So, it should have worked… Mousing over all the recent post links in the sidebar will show the url as https://localhost/myfoldername/category/postname

    but when I click to test…I get 404 error page.

    Permalinks? mod_rewrite?

    Xampp works great as on a usb stick to take your development environment with you. Have you checked Options/Wordpress address (URL) and Options/Blog Address (URL)

    I like putting in a full hostname instead of localhost. Then it works on the network if I need it to. A dummy host/domain name works fine if you can run a local DNS (or use a hosts file or a modern router that can do specific resolution and anyone connected works as it should)

    Thread Starter Bliss7

    (@bliss7)

    I think XAMPP doesnt need a mod_rewrite does it? I found it worked out of the box, meaning I could change the permalinks to default, date based, or custom permalinks…

    It will tell me my settings have been saved…etc

    But the only permalink that the links will work with once I have transported my blog to my localhost is the default permalink structure.

    In WordPress options, it already shows the blog url as https://localhost/myfoldername

    So only “default” or the “ugly” permalink stucture works. As for the other types.. (nope).

    Something to do with the XAMPP settings and mod_rewrite I think…But the XAMPP looks ok and everything in the WordPress admin looks ok!

    Well, I needed to “turn on” the mod_rewrite.
    See at the bottom of the tutorial:
    https://www.tamba2.org.uk/wordpress/xampp/

    Hmm, I have this same problem on localhost. Tried enabling mod rewrite and now it just jumps to the xampp splash screen. Any ideas anyone?

    https://www.dutchnewz.com

    Hi.

    I’m pretty new to WordPress and I’m attempting to do what you guys seem to be trying to do.

    I take it that you have copied all the WordPress files from your ‘wordpress’ directory on your webhost onto your localhost before trying any of the stuff mentioned above?

    I’m just trying to weigh up whether it’s worth doing all this stuff. Downloading all the files and changing all the references to my webhost within my WordPress database to reference my localhost instead of just using ftp because surely I’ll have to change all the references back when i put it live.

    finally got mine to work by changing the url type back to the bog standard one, ie not the title of the post as a url

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    I use a copy of XAMPP Lite for testing on my local machine. It works okay. Few minor tips:
    1. After uncompressing XAMPP Lite to a directory, you need to run the setup batch script to make it work properly.
    2. You need to find Apache’s httpd.conf file and enable the rewrite module by removing the # in front of that line. Then pretty permalinks will work.
    3. I prefer to put a copy of WordPress into a “wp” directory under htdocs. This way I keep the xampp default stuff and can test wp separately. I usually am using SVN, so it makes it easier to update too.
    4. For posts and such, don’t try to copy the database directly. Use the Export on your blog and Import into the new local blog. Simpler.

    To: Otto42

    Cheers. I’m using XAMPP as well.

    Just a couple of questions. What do you mean by SVN? And also i take it that exporting from my webhost wordpress will mean i can tell it where to export to i.e. my localhost version?

    Thanks.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Mine is up and running now. I simpley ftp’d my ‘wordpress’ directory from my webspace into the ‘htdocs’ directory of XAMPP and then followed the steps on this page which is mentioned above:
    https://www.tamba2.org.uk/wordpress/xampp/

    It’s probably just as easy to download WordPress as it is to copy the folders from your webspace because you still have to install it on your localhost and then use the export facility on your live blog to get all your posts etc onto your local version.

    The export facility is found at: /wordpress/wp-admin/export.php
    on your webspace.

    Hope that’s of help to anyone who is still stuck or anyone who finds this thread.

    p.s. I’m not too sure what this ‘permalink’ stuff is about but all the links to my categories and posts etc seem to work just fine.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Any experts here who run WordPress on localhost?’ is closed to new replies.