• Resolved BobRoberts123

    (@bobroberts123)


    Notice I use the word “copy” and not “move” – it’s only for test purposes and I want the current site to keep running for now.

    I assume I should go into PHPMyAdmin and import the SQL script from the WordPress site. One important question I have, is, before doing this, can I open the *.sql file up in Wordpad and do a global change on the “https://hostingurl.com/customwebsite” and set it to my local site? Will that work? And if it will work, what should I change the URL to in order to get it to work as a local test site? I’ve unzipped the entire WordPress site into a folder called “C:\Program Files\BitNami WordPress Stack\apps\testapp”. Would I, for example, change the *.SQL file for the URL to read “https://localhost/testapp”?

    Keep in mind this is a Windows 7 PC. It currently is running IIS, and if I would type in “https://localhost” into my web browser, then it would run the default site registered under IIS. So I guess that leads to another important question – how is this WordPress site on my PC “registered” to run under the Bitnami Apache web server. I can’t find any specific documentation that lists exactly what you have to do to type in a local URL in your browser and have it run your WordPress test site. Thanks in advance for consideration of these issues.

Viewing 15 replies - 16 through 30 (of 33 total)
  • Hi BobRoberts123,
    Follow this article to reset you root password
    (Quick note, when logging into the mysql console the password will either be the one you specified above or just enter nothing at all and hit enter, as wamp doesn’t give the root user a password by default)

    Once you regain access to phpmyadmin just create a new database import that wordpress site like I described in the posts above and in your wp-config file the username is root and the password is whatever you assign it.

    Give me a shout if you need any further help.

    Thread Starter BobRoberts123

    (@bobroberts123)

    Thanks Sunny, and that is the first half of it, but I had to modify the C:\wamp\apps\phpmyadmin3.4.5\config.inc.php file for the following parameters:

    $cfg[‘Servers’][$i][‘password’] = ‘yourpassword’;
    $cfg[‘Servers’][$i][‘AllowNoPassword’] = false;

    But even after doing that, the WAMPSERVER phpMyAdmin still won’t let me in. But fortunately, if I type “https://localhost:81/phpMyAdmin” in Firefox, that lets me in.

    Well, at least in Wamp it lets me create a unique folder structure for my WordPress site, but it still displays the site in “static-html” mode – it does not look like the production WordPress site. The basic functionality is there, but it looks quite different. To reiterate, it has a folder structure of “C:\wamp\www\newwordpresssite\wp-content\plugins\really-static\static” that contains index.html files that are the ones displayed for all the pages. I presume that these display instead of the index.php files. Obviously, something somewhere is triggering or toggling this alternate display mode.

    I went to “install” wordpress-3.3.1, and was surprised (or perhaps not so surprised) that all it did was create a WordPress folder structure – it’s not an actual install at all. Yet I had asked someone on the forum if it needed to be installed prior to my unzipping the exported site, and someone told me “yes”. So the lack of a true WordPress installation wouldn’t account for the site displaying in “static-html” mode.

    Hi BobRoberts123,
    Here are a couple of points to guide you in the right direction

    1. You need to disable your iis as https://localhost:81/phpMyAdmin is not the wamp phpmyadmin and is irrelevant to your wamp installation.
    2. Restart your wamp server after making these changes and try phpmyadmin again (Click the wamp icon in the windows taskbar – near the clock and select the ‘restart all services’ menu option.
    3. There is no alternative mode being triggered it is just because wordpress is not setup properly and as there is no database connection that is why it is displaying the file/folder structure in your site.
    4. If you are copying just the theme folder in wordpress then you need to install wordpress prior to installing the theme. But from what you have told me it seems like you are copying over the full site which includes the wordpress core files, so you don’t need to worry about all that and just follow the ten steps I listed above once your phpmyadmin is working.
    5. What exactly is the error that you are getting when trying to access phpmyadmin?
    6. Also let me know when you are at a stage where you have got phpmyadmin working and you have imported your database and I will gude you from there. I think all of these forums/other peoples comments etc are just confusing you and making you think that this is a bigger task then it actually is. I was daunted by this at first but trust me once you learn how to do it once you will be setting up a new wordpress site in less than 5 mins.

    Hope that helps
    Sunny

    Thread Starter BobRoberts123

    (@bobroberts123)

    Yes, I’m using the full site that I’ve unzipped into the C:\wamp\www\newwordpresssite folder. I did stop the IIS services, but keep in mind that I installed Wamp to user localhost:81, and I changed the configuration files to reflect that, and that seems to work. I had rebooted my PC, and now I can run phpMyAdmin from the Wamp menu group. The WordPress database “newwordpresssitedb” I had created before is still there. The tables have names such as newwordpresssitedb_options, and the columns reflect the URL change in the 3 SQL queries I ran before. This is the first query:

    UPDATE newwordpressite_options SET option_value = replace(option_value, ‘https://currentsite.com/newwordpresssite’, ‘https://localhost:81/newwordpresssite’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;

    Could the problem be that phpMyAdmin is not asking for a login, so it isn’t clear what user is creating the database, loading it, and changing it, and if that user matches the one in the wp-config.php file? wp-config.php:

    // ** MySQL settings – You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define(‘DB_NAME’, ‘newwordpresssitedb’);

    /** MySQL database username */
    define(‘DB_USER’, ‘root’);

    /** MySQL database password */
    define(‘DB_PASSWORD’, ‘wp123456’);

    /** MySQL hostname */
    define(‘DB_HOST’, ‘localhost’);

    One question I have is the “MySQL hostname” above. I assume it should not be “localhost:81”, since it is referring to the MySQL server and not the web server.

    I think I might have run this in the MySQL console:

    UPDATE mysql.user
    ->SET Password=PASSWORD(“wp123456”)
    ->WHERE User=”root”;
    mysql>FLUSH PRIVILEGES;

    And I also made this change:
    C:\wamp\apps\phpmyadmin3.4.5\config.inc.php:
    $cfg[‘Servers’][$i][‘password’] = ‘wp123456’;
    $cfg[‘Servers’][$i][‘AllowNoPassword’] = false;

    Is there any way to tell if the WordPress site is able to login to the newwordpresssitedb database? Or to simplify the login so it is more likely to work?

    Hi,
    The fact that phpmyadmin is not asking you for a username doesn’t matter as far as it is concerned ‘root’ is definately the user. You should have just installed it on localhost. Do this, delete the wp-config.php file again. Visit https://localhost:81/newwordpresssite in your browser follow the steps, but this time when it asks you for the MYSQL Database Password just leave it blank and tell me what happens. WordPress should tell you whether it was able to connect to the server. If it was not able to connect to the server try the following options in turn to figure out what is going on: 1. Change the hostname to localhost:81 2. Put the existing password that you have set in the password field and leave the hostname as localhost 3. Change the hostname to localhost:81 and put in the password you have specified above.
    Again your life would be alot simpler if you just follow the recommended wamp setup on localhost and follow the steps I outlined before. But give this a shot and give me a shout if you need any further assisstance.

    Sunny

    Thread Starter BobRoberts123

    (@bobroberts123)

    Hold off on this issue – I’ve compared the pages of the production on-line site and the one I’m displaying from the zip file, and I have found slight differences in wording. So what I could be looking at is an old version of the WordPress site – though I had brought this to the attention of the site administrator weeks ago with full screen shots, he says the zip reflects the current site.

    In addition, there is a folder that seems to contain the “static-html” pages:

    C:\wamp\www\newwordpressite\wp-content\plugins\really-static

    Well, I deleted this entire folder, and it didn’t affect the way the site looks!

    Hi BobRoberts123,
    The ‘really-static’ plugin is not included with the wordpress core files, it is a caching plugin that produces static html pages of your wordpress blog so that they can render faster (instead of having wordpress dynamically construct the pages everytime it is requested). This may be a reason why you are facing so much difficulty but I recommend disabling the plugin, getting the wordpress site to function as normal and then re-enabling the plugin once it is on the production server. Again just give me a shout if you need any further assistance.

    Sunny

    Thread Starter BobRoberts123

    (@bobroberts123)

    Well, I do need to know how to disable the plugin. I’ve found all sorts of vague references to doing that, but no specific instructions. Also, I’m puzzled about something – how can the Really-Static plugin be enabled if I can delete the …\plugins\really-static folder structure and have the WordPress site run the same, without an error? And if it’s not enabled, why do I have to concern myself with deleting it?

    I’ll go ahead and post the results of your suggested tests above in trying to determine if the WordPress site can connect to the database:

    Sunny, I know you suggest that the reason this WordPress site is running in “static-html” mode is because, “3. There is no alternative mode being triggered it is just because wordpress is not setup properly and as there is no database connection that is why it is displaying the file/folder structure in your site.”

    But I tried a little test – I modified the wp-config.php and put in an invalid database password. If the site is displaying in static-html because it can’t log in to the database, then that would not have any effect – it would look the same. But when I did that, the site gives a “the website cannot display the page” error.

    I decided to create a new database in phpMyAdmin (wpdb) and I remembered that before I had used utf8_unicode_ci, and so I made sure it said utf8_general_ci. I also had specified MYSQL323 in the “Format-specific options”, and this time I left it as “None”. I also used the “Privileges” tab in phpMyAdmin to setup a new user with an auto-generated password.

    I followed your suggested tests above, deleting the wp-config.php, and want to comment that of course changing “Database Host” to “localhost:81” is not going to work, because only the web server is set to “localhost:81” – the database is at “localhost”. So, if I change the database server to “localhost:81”, with or without a password, it does nothing, trying to run “localhost” in the browser tab above.

    If I leave the Datbase Host at “localhost”, and either blank out the password or put in a wrong one, I get:

    “Error establishing a database connection

    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server

    at localhost. This could mean your host’s database server is down.
    ?Are you sure you have the correct username and password?
    ?Are you sure that you have typed the correct hostname?
    ?Are you sure that the database server is running?”

    And if I use an old database with an old user, I get:

    Can’t select database

    We were able to connect to the database server (which means your username and password is okay) but not able to select the newwordpressitedb

    database.
    ?Are you sure it exists?
    ?Does the user pauser have permission to use the newwordpresssitedb database?
    ?On some systems the name of your database is prefixed with your username, so it would be like username_newwordpresssitedb. Could that be the problem?”

    However if I use either an old database, new user and new auto-generated password or a new database, new user and new auto-generated password, I get this:

    “All right sparky! You’ve made it through this part of the installation. WordPress can now communicate with your database. If you are ready, time now to…Run the Install”

    When I click the Run the Install button, it then it tells me WordPress is already installed: “Already Installed

    You appear to have already installed WordPress. To reinstall please clear your old database tables first.

    Log In”

    But the fact is, the site still displays different than the production one on the web, which, as I mention above, causes me to question whether I was given the current version of the site.

    Thread Starter BobRoberts123

    (@bobroberts123)

    I finally determined that it is indeed a different site – but learned a lot in finding that out. Thanks for your help.

    Hi Sunny,

    I followed your instructions and managed to set up a test site locally. Although I can login to the Dashboard it doesn′t let me see the actual site.
    my localhost i actually localhost:8666 and I did all the changes accordingly but when I′m in the dashboard and try to visualize a post or page it says

    Object not found!

    The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

    If you think this is a server error, please contact the webmaster.

    Any ideas what it might be?

    Well it seems I found the solution. I have named the new site exactly like the original so i just changed the name and everything was perfectly.

    Thanks for the great step by step tutorial.

    Hi emaravella,
    My pleasure, I am glad you resolved your issue. If you need any help give me a shout ??

    Sunny

    My site https://www.immersonal.com is working fine at its web host (godaddy), but when I bring it down to localhost (WAMP) I am getting tons of error messages such as the following, with call stack information following each error message:

    “Strict standards: Non-static method truethemes_accordion_class::init() should not be called statically in C:\wamp\www\imm_dev\wp-content\themes\Karma\truethemes_framework\global\shortcodes.php on line 692”

    “Strict standards: Non-static method W3_Request::get_boolean() should not be called statically, assuming $this from incompatible context in C:\wamp\www\imm_dev\wp-content\plugins\w3-total-cache\lib\W3\Plugin\TotalCache.php on line 355”

    “Strict standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method GA_Filter::nav_menu() should not be called statically in C:\wamp\www\imm_dev\wp-includes\plugin.php on line 170”

    There are many of these throughout the site, interspersed through the content of the page.

    I assume this is a developer tool within WAMP that perhaps I can turn off to work on the page?

    Any help would be appreciated.

    Please post your own topic.

    When I copy a site (FTP download), is there any files or folders that I can leave? Files and folders that WordPress will regenerate…

Viewing 15 replies - 16 through 30 (of 33 total)
  • The topic ‘How to Copy WordPress Site to Local Test Server’ is closed to new replies.