How to setup local server for wordpress site with git - mysql

I'm working on a WordPress site via Sourcetree. The previous dev working on this project had set up a local server with Docker, however I have no experience with this.
My question is - how can I connect to localhost to start developing?
Note-
I've downloaded mysql, xampp and wordpress locally
I have experience developing wordpress sites locally (via an FTP such as FileZilla), however I've never done so with git included.
Thanks.

Try to follow these instructions:
https://premium.wpmudev.org/blog/setting-up-xampp/
Probably one thing that you are not doing properly is that your project doesn't sit in xampp/htdocs/myproject as that way you can access it through http://localhost/myproject

Related

How can I migrate a Locally hosted Wordpress site to a remote host?

I have a website on my locally hosted XAMMP server (Windows). I need to transfer this over to 123Reg.
The XAMPP server runs: PHP 7.3.2 and MySQL 5.5.5; and the 123Reg server runs:PHP 7.2.16 and MySQL 5.5.5
I have tried using Duplicator. It works however I cannot access the Wordpress backend (wp-admin) using any admin credentials or make a new one in the Duplicator wizard and via the database (it would just say 'Sorry, you can't access this page', and yes, I have tried deleting plugins and editing the .htaccess file with no luck). I have tried a manual migration (export and restore files and database) as well with the same issue as the duplicator one.
Currently, I have installed a new version of Wordpress on the 123Reg server can copied the wp-content directory from the XAMPP server to the 123Reg one. However, this is not enough. I need the whole site (including pages), cloned so they look exactly as they are on the XAMPP server on the 123Reg server.
I was expecting it to transfer the site without errors as the site is fine on my XAMMP server, but it's not.
Am I doing something wrong? I am not sure of what to do now so I would appreciate any sort of help.

WordPress Access

I'm working on a website with a friend using Wordpress and we are trying to access the same WordPress account from both mine and his computer, so that we can work on the website together. We have tried to add each other as admins but can only access the new account from the computer the admin has been created on. Does anyone know how to do this?
By the way wordpress is run on wampserver
WAMP server is for local development (like XAMP, LAMPP and MAMP). When you install WAMP and install Wordpress inside it, it can be only accessed from that computer. You can create multiple admin accounts on single Wordpress installation. (Do not use single admin account for both of you.)
However in this case, you can't access the local Wordpress installation with multiple computers. to do that you may have need to buy a domain and a hosting from a hosting provider. Then you can create two admin accounts and start developing.
Or, as JJJ suggested you can convert WAMP+Wordpress installed computer to a server, but its hard and I do not think it'll be a good idea for this.
WAMP is local. You can move the WordPress install onto a shared hosting relatively painlessly and cheaply then can collaboratively work on it.

How to use Wordpress with localhost and a preexisting database on another server

I've been working on a Wordpress website on my web hosting server. But I wanted to start doing the Wordpress changes locally, while still using the database with all the posts and stuff that's already on the server.
I installed Wordpress on my computer, and had it connect successfully to that database, but going to localhost/website/wp-admin would redirect me to www.site.com/website/wp-admin, and then proceed to do everything on the server again, which I didn't want, and localhost/website would just appear blank.
I tried having Wordpress use a new test_database on the server, and it was happy with that. Wordpress started to run locally, localhost/website wasn't black, while using a database on the server. Even when I wiped out my local Wordpress and reinstalled it connecting to test_database, all the posts remained intact, and Wordpress was still running locally.
How come I was unable to get Wordpress running locally when I tried to connect to the first database?
You're trying to use the same WordPress database instance on two different URLs. You Can't Do Thatâ„¢. Someplace in the options table is the database's URL. It's used to construct many links in WordPress. That's why you're jumping back to the production server.
You can use a plugin like Duplicator to make a copy of your production web site to use as a staging server, or vice versa.

Move a WordPress Site to Openshift

I have a working WordPress website hosted at Hostgator which I want to move to Openshift. Till now I have done :
Downloaded the entire WP installation(including wp-includes, wp-admin,wp-content etc.)
Downloaded the original MySql database with phpmyadmin(both zipped and .sql format)
Installed fresh WP on Openshift, later I logged in into the database of this new installation and dropped all the tables(with phpmyadmin).
Thereafter uploaded the original database, successfully imported into the new Openshift database(with phpmyadmin).
Then I upload all original downloaded WordPress installation files into the Openshift one, overwriting everything.
Now I see a database connection error. I guess Openshift doesn't recognize wp-config.php details which consists of the Hostgator data(which I am confused as I don't know if I should be editing the one in the GIT folder or the one in the app-root/current).
Request a step-by-step process. Help appreciated.
My suggestion would be to use the Openshift Wordpress quickstart, and get a Wordpress application deployed and then just restore the DB.

LAMP server, website not displaying correctly on host

I'm pretty new to LAMP and web design in general, so please excuse any obvious mistakes I may be making.
I have setup a LAMP server on my Linux (Ubuntu) virtual machine and proceeded to install Wordpress. Everything is working fine when I access via the virtual machine.
However, when I access my Wordpress site via the host machine (Windows), it seems to be lacking any styling. The HTML seems to be rendering fine, but nothing else.
Here is screenshot of how the Wordpress page is displaying on my host system-
Any ideas what is causing this behavior? Thank you!
Maybe you can provide us the folder structures of your WordPress template and CSS?
Can you also view page source of the webpage and check the current CSS path that the template is pointing to?
Thank you.
Your web server is communicating with the database which is definitely a good sign. What's causing the behavior is that the link to style.css isn't configured correctly. Could be file permissions if your using the theme that WP comes with otherwise it could be permalinks or a broken link in the theme.
If your just looking to set up a site locally for development I would recommend using WAMP (pc) or MAMP (mac). A VM is a little overkill and CPU intense if your running Illustrator and Photoshop at the same time.
WAMP http://www.wampserver.com/en/
MAMP http://www.mamp.info/en/index.html