WordPress.org

Ready to get started?Download WordPress

Forums

WordPress site from live to localhost (linux??) (9 posts)

  1. alig301
    Member
    Posted 1 year ago #

    Hi I am trying to move my site to a localhost for testing. It was originally built on my hosting site where I installed wordpress. I have been told the issues I am having are due to it being built in Linux and I am trying to install it in windows. The files and the database are all set up and I have enabled rewrite in apache. Is there anything else I must do to get the website running locally. I can now at least get to the wp-login.php page now after enabling apache rewrite option. Oh I am using Wamp (full version) as my database server.

    Any help would be greatly appreciated.

    Kind Regards
    AliG

  2. W.P. Ginfo
    Member
    Posted 1 year ago #

    Hi Alig301,

    As far as I know it's 'unusual' to have problems 'because a site was originally created in linux'. Code = code, esp. HTML, PHP and CSS.

    Create a backup of the old / original WP-site:

    1. FTP: Make a backup of the files of your old site, using FTP 'Filezilla' [free] or your own FTP-program.
      (see: http://codex.wordpress.org/Using_FileZilla )
    2. !!VERY IMPORTANT!!
      Make a backup of the CONTENT of the old site
    3. dashboard > tools > export > all content > download exportfile
    4. If required: confirm installation of export tool and run the export

    You will need this to transfer your content, later on.
    You now also have a fallback position, should things go wrong!

    NOTE!!! Make these backups every time BEFORE you make changes!
    Repairing problems becomes much easier!!
    == == ==

    1. When using WAMP, all you need to do is install/ copy wordpress in the 'www' directory op wamp.
    2. Use PHPMyAdmin in WAMP to create a database
    3. In a browser: 'http://localhost' or 'http://localhost/[your folder]', to start the WP-install.
    4. After the install, check if all is well.
    5. !!IMPORTANT!!Now make a backup of the wp-config.php-file of the NEW install
    6. == == ==

    7. Copy all files and folders [backup above]of your OLD site to your localhost site, OVERWRITING the new.
    8. Copy the backed-up NEW wp-config.php to the localhost, overwriting the old one
    9. Now restore the content by restoring the database backup, made at the top of this list
    10. Dashboard > Tools > Import > wordpress > choose the exportfile from your computer, and 'upload file and import
    11. If required: confirm installation of import tool and run the import

    You should now have a localhost version of your old site.

  3. alig301
    Member
    Posted 1 year ago #

    Hi,

    thanks for the reply. I have previously done as you have detailed but it is still not working.

    I can get to the login page now but my login 'Admin' and password don't work and the login page doesn't look like it has rendered properly.

    Arrrrrgh!!

  4. W.P. Ginfo
    Member
    Posted 1 year ago #

    You should be able to access the database with phpmyadmin.
    Try and create a new user with admin-rights, and then login as this new user.

  5. alig301
    Member
    Posted 1 year ago #

    I have a user as root with global privileges and no password. So should I be trying to log in as root or Admin. I am sure when I initially installed WordPress I logged into wordpress as Admin with a password before overwriting the files.

  6. alig301
    Member
    Posted 1 year ago #

    I did change "siteurl" and "home" in the database table "wp_options" through phpMyAdmin.

    Sorry about the double posting, I figured it was a separate issue I was now encountering.

    In the Database I have a user as root with global privileges and no password. So should I be trying to log in as root or Admin. I am sure when I initially installed WordPress I logged into wordpress as Admin with a password before overwriting the files.

    Regards
    A

  7. W.P. Ginfo
    Member
    Posted 1 year ago #

    Have you tried adding a user yet, as suggested?
    If so, with what result?

  8. alig301
    Member
    Posted 1 year ago #

    I have a user as root with global privileges and no password. So should I be trying to log in to wordpress as 'root' or 'Admin', or are you saying I should create another user with global privileges and if so what user name and where do I make the changes to allow it.

    I am happy that I need to change the wp-config.php which should allow access to the database but I already have that set. See below

    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'kimscake_wp431');

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

    /** MySQL database password */
    define('DB_PASSWORD', '');

    /** MySQL hostname */
    define('DB_HOST', 'localhost');

    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8');

    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');

    kimscake_wp431 is the name of the database created in myphpAdmin on localhost.

  9. W.P. Ginfo
    Member
    Posted 1 year ago #

    1. Just use PHPMyadmin [part of the WAMP] in the system tray on the bottom-right of your windows taskbar, click the wamp-icon
    2. click 'phpmyadmin'
    3. select the correct database
    4. in the left sidebar a list of tables opens:
      locate:wp_users [you may have chosen a different prefix]
    5. click the top entry
    6. click the copy-link [left]
    7. a screen opens:
      • enter different user_login, _password and _nicename
      • save as a new row / entry [pull-down]
      • start
    8. Opern the broowser and login as the new user
    9. check if things are working again

Topic Closed

This topic has been closed to new replies.

About this Topic