How can I log into an existing wordpress site locally on mac - wordpress

I already have a live existing wordpress site. I am trying to install wordpress locally for mac. I want to make edits of my site, but don't want my live site to look under construction. I have tried Bitnami and Local, but only see the option to create a new site and dont see a login to existing option. I appreciate any help, thank you.

Bitnami Engineer here,
You can also use the All in One WP Migration Plugin to migrate the data of your live site to the development one (this one can be the one we offer in our site: https://bitnami.com/stack/wordpress/installer). Once you test your changes, you can apply them in the live site.
You can find more information about it in our documentation
https://docs.bitnami.com/installer/how-to/migrate-wordpress/

So you want to use your live database and do the changes in your local WP installation. It's much simple if you download your live database and import on localhost and do the changes.
Anyway if you want connect to live database follow this steps
Open wp-config.php Change the following values
Database Name Database Name used by live WP
Database Username Username used to access live Database
Database Password Password used by Username to access live Database
Database Host Live MySQL Hostname don't mention localhost or 127.0.0.1.
You can get this information from your hosting provider
Also you need enable Remote MySQL.

Related

ERR_SSL_PROTOCOL_ERROR after migrating WordPress site to another site - attempting to create staging environment

I have a site hosted on 1&1 Ionos hosting. Purchased an SSL for the site from 1&1 Ionos as well. So let's say https://www.business.com/ is what I have. Then I have another another site say http://www.mycompany.com/ hosted at the same place - still waiting for my business SSL to be approved hence the http.
So I exported the database from business.com using plugin WP Migrated DB - setting the new URL and actual filepath.
Then I imported the database into a new database for my staging environment to be hosted at http://www.mycompany.com/clients/business.
I copied ALL the wordpress files for the site http://www.business.com/ into http://www.mycompany.com/clients/business exactly except I changed wp_config.php file to reflect the new database details. i.e username, database, location and password.
So I expected http://www.mycompany.com/clients/business to be a complete replica of the original https://www.business.com/. But when I browse to http://www.mycompany.com/clients/business I get the following error:
This site can’t provide a secure connection mycompany.com sent an invalid response.
Try running Windows Network Diagnostics.
ERR_SSL_PROTOCOL_ERROR
I can't even login to the admin panel of http://www.mycompany.com/clients/business/wp-admin
Is what I tried even possible and if it is please tell me what I did wrong and how to fix it. I'd like to create a staging environment to test new themes and plugins before implementing on live environment. Critical to my original site is the aMember plugin which manages all the membership registration info. I've deleted the Really Simple SSL plugin folder from WP-Content/Plugins folder but the error remains.
Thanks in advance for any and all help and advice!
Step 1:
Check your .htaccess for rules enforcing https
Step 2:
Did you replace all links in the database? If not, you must search and replace all links from https://www.business.com/ to http://www.mycompany.com/
You can use a tool from: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/comment-page-4/
Or just use command line wpcli (wp search-replace https://www.business.com http://www.mycompany.com
Step 3:
Open the new 'http://www.mycompany.com/' in a incognito tab. Browser caching might still redirect you to https.

Website preview for a wordPress based site on a development server

I have created a demo website for a client. I installed the site on the client's live domain name and I used the etc/host DNS trick to point the domain to my development sever. Now I want to send a live preview to client for validation but I don't want to bother her with technical details such as modifying local computer host file. The client doesn’t want to switch the domain to the new site either, until everything is ready as the site is highly active. I have tried the cpanel temporary link (mod_userdir is enabled) but it breaks everything including styles and scripts. Do you have any solution. Thanks.
Update: I have found this site if it can help nodns.io, they only need the emulated domain name and the development server IP.
You can still use the temporary URL and that is the easiest way. You just need to make a change in the WordPress database. You can go to cPanel -> phpMyAdmin, open the database and look for the _options table.
Once you find it, you need to change the home and siteurl options to the temporary URL:
https://codex.wordpress.org/Changing_The_Site_URL
You can follow the "Changing the URL directly in the database" directions.
Goodluck!

How to access wordpress database using aws server

How can I access wordpress database using aws server. Currently, an existing website in running online and the server used is aws. We need to update something and we need the db to run into our local and dev site. I have tried using aws on other website but this one which is a wordpress site, the database cannot be found on the aws rds. So I'm thinking the db is added somewhere in the FTP (maybe phpmyadmin folder) but I don't know how to get and find it. How can I solve this one?
Your question is a bit confusing, Wordpress uses MySQL as its database. This is defined in wp-config.php
You can edit that file to change which database WordPress is using https://codex.wordpress.org/Editing_wp-config.php#Set_Database_Host
Thanks for the answer guys, most of you are correct. It was installed locally, I already access it using shh. I'm using windows so I used putty.

Problems in migration from localhost to my online webserver of a WordPress website

I am finding some problems uploading a WP site from my local web server to the official online web server.
The situation is the following , on my local web server:
I have installed WP website on my computer
I have configured it
I have installed custom a template
After, I have uploaded this site in a folder on my official online web server. I have took the local database export and imported in the online database using PhpMyAdmin (to export the local database on a file and then to import it on the online database)
Finally I have changed the file wp-config.php changing the MySql connection settings and putting here the settings related to the official online database.
When I try to open the website it appears to me, here you can say how: http://www.scorejava.com/wordpress/
Ok...seems good but there are two problems:
If you try to open an article it is not open the article on the online server but in the localhost server, infact open this URL: [code]http://localhost/wordpress/?p=81[/code]
If I try to open the administration panel opening this URL: [code]http://www.scorejava.com/wordpress/wp-admin/[/code] I obtain a white page
I don't know if these two problems are related together but I think that all may depend due to a problem of location path...
I think that somewhere there is some settings that specify the URL (that can't be localhost...), but (if it is so...) where is this setting? in some file or in the database?
Some one have an idea? Can you help me?
Look into this: http://codex.wordpress.org/Moving_WordPress
There's a link on there for a "Search and Replace for WordPress Databases Script" tool that's very handy (make sure to read the instructions and have a backup of the db before using it). The problem is that image URL's and other things are stored in the database and will reflect the URL of the dev location. That tool will go through and properly update all instances from the dev URL to the final location.
Normally before you move a WP site you also want to update the site URL in the General settings as well, which may be contributing to your second problem.

How do I create a wordpress database on XAMPP server?

I created a WordPress site on phpfog, then used git to download it locally. The way phpfog is set up I can't get to the wordpress database and access it from my localhost installation. I need to set up another database. So far, I haven't been able to get it to work. Phpmyadmin won't open.
(I've also tried a new installation of Wordpress and the same thing happens)
I think the problem is that i need a database. But, where do I put it? What directory?
Here is where I'm at right now:
in the wp-config.php file, I've changed the parameters "user" to 'root' and the password to 'mypassword'
in mylini, I've changed the password param to 'mypassword' and the port to '3306'
in config.inc.php, I've changed "user" to 'root' and 'password' to ''
When I try to connect to phpmyadmin, I get this.
Error
MySQL said:
Cannot connect: invalid settings.
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
I've tried a number of ideas on various forums, but nothing gets me past this yet. Any ideas would be awesome.
Greg
First - It's hard to know how to answer as your question is rather vague. There's two very different things involved. First, setting up xampp. Then setting up wordpress. I couldn't quite figure out which you were referring to for each error, so here's a long winded explination/answer in case any thing helps:
Are you on Linux I presume? On windows it was a bit of a hassle and wamp was 20x easier. But, you might consider a preconfigured stack that includes xampp (and necessary includes) and a few other goodies, some come with wordpress installed. I haven't personally used them, but wish I had - google ought to help out there.
I'm assuming you went to (http://)localhost/phpmyadmin, right?
First you need to get there before you hook up wordpress. As for hooking up xampp, it does take some configuration, so make sure you follow the docs - it's not quite a one click install.
Once you have xampp setup, you need to create a new database in localhost/phpmyadmin for wordpress. Then go back to your file folders, which should be located in xampp/htdocs/yourwordpressinstall.
config.inc.php - is that your wordpress directory?
It needs to be wp-config.php (if it's not already there, save wp-config-sample.php as such). Open that, change server to localhost, database to the name of the database you just created. The username and password are the ones when you installed xampp. By default, I think they're User: Root, and PW: unset(blank). If you go to phpmyadmin there's a link to security and it'll show you there. localhost/phpmyadmin
Now, you should be able to type in the location of the filefolders.
localhost/wordpress/
- assuming your server is started, and the wordpress root folder is name "wordpress" and is in the xampp/htdocs/ folder.
From there you should see wordpress.
However, if you've exported your database, you'll need to change the site_url and home_url options to the new url. I'd suggest using the plugin wp db migrate (something like that) which will allow you to export the database from wordpress and auto set the values. Once the plugin is installed it's under the tools menu.
If you google migrating wordpress, you'll find plenty of tutorials and guides for moving wordpress from local to live, or as you're doing, online to local.
Sorry, I have to run, so I'm not sure if I really got to exactly what you needed, but that should get you started and give you the keywords to let google and other tutorials/docs get you the rest of the way.
I would recommend developing locally. That is, you develop stuff on your own machine with a dummy database. When you are happy with your changes, you upload them to your server, which works with your real (production) database.
To hook your local copy up with a database:
Install MySQL on your local machine
Open an interface to MySQL. On a UNIX-like system, you could type mysql on the command line
CREATE DATABASE ''databasename'';
GRANT ALL PRIVILEGES ON ''databasename''.* TO "''username''"#"''hostname''" IDENTIFIED BY "''password''"; (if hostname is %, you can log in from all hosts)
FLUSH PRIVILEGES;
Update your local wp-config.php with your local credentials and database name

Resources