Connect to a non locally hosted database when using MAMP? - php

im looking to launch a site soon that will have lots of user data on it.
For easier testing and uploading etc for changes i want to know if i can work on my MAMP site, whilst using directly the database from the live site?
Thanks.

I recently used MAMP and my database connected fine from one at the hosting company (not locally) if you use Joomla you can change the configuration.php file to point to your live database.

Related

After deploying wordpress project to server not loading wordpress

I am working on a WordPress project, the job is to deploy everything from the old server to the new server.
So I downloaded everything from the old server.
I deployed a WordPress project to paid hosting, I deployed manually by pushing all the public_html folder to the server.
First, without a database connection, it was showing me a database connection error but after the database connection, it is showing me a hosting page instead of my WordPress project page.
How can I fix it and is there a configuration that needs to be fixed?
Kindly guide me and help me in this matter.
Also is it a domain configuration issue?
The domain is configuration is on the old server and I didn't set it up for the new server yet.
Thanks.
I faced similar issues yesteday when i tried to move my woocommerce exercise from localhost to my domain(live hosting),broken all links,images,routes etc ...There is no way to fix all that whithout paid plugins, maybe someone can go through whole db and change URL-s,i cant,and after that, the question remains whether I have problems elsewhere in the local WP code,who know where in code i also have embed "localhost" URL.
I cant give you solution but i must share my frustration with this tehnology which doesnt allow normall development process like 1)development -> 2)testing -> 3)deployment .

Trying to connect local wordpress site to a remote db

There is a site at my job that has only been maintained by 1-2 developers for a while but as more developers are being added to it we want to implement git. The workflow we're looking for has everyone using a local copy that is connected to the same remote database. We can all push and pull code as needed while any database changes would be shared that way.
I'm running into a weird issue where many files are refusing to load or clicking on any link results in a redirect to the xampp dashboard.
I downloaded xampp and created a directory in htdocs called local_test. I downloaded all the sites files into that directory with ftp. Grabbed the dbs info from the host and whitelisted the outside ip address on the host.
I went into wp-config.php and changes all the db values so it connect correctly. Plus I added:
define('WP_SITEURL', 'localhost/local_test/');
define('WP_HOME', 'localhost/local_test/');
At first I was convinced it was a db issue, but I can connect to the database remotely just fine using mysql workbench so I doubt it's that. The footer and the header show up, just not much of the content in between and like I said whenever I click on a link it redirect to the generic xampp dashboard.

Using Xampp and 'git' for team web development in wordpress. Database issue

me and a coworker are trying to move a website from a test server to local web development. Our boss wants us to use Amazon web services CodeCommit in conjunction with Xampp to do this. We have made progress but cannot overcome a database issue. Here is what we have done.
Set up AWS accounts and recieved necessary credentials from boss for the sites repo
Pulled repo and ensured that we could both commit and pull normally
Downloaded xampp, made sure apache and php were functioning normally
Now, one of us (me) has used the duplicator wordpress plugin to backup the site and load it into a local version.
I can now develop locally fine and push changes, all images and pages from the site are showing up locally
ISSUE:
How can my coworker also develop locally, the issue appears to be that he has not made a database in xampp phpmyadmin control panel for the site, but if he did wouldnt it be a different one than I am using, and thus wouldnt sync with git properly? Where xampp stores the database info isnt in the git folder, so I may be doing it wrong as well!
We cannot figure out the correct course of action, please if you can point us in the right direction. Much appreciated!!

Using MAMP to test online instead of localhost

I'm new to PHP and everything, so I'm trying to learn some things.
I'm currently developing my first PHP site in Dreamweaver using MAMP and Localhost.
I have already bought my domain name, and built a smaller html site just to act as a "holding site" before the PHP one gets put up. I'm wandering if instead of using localhost, that I could use a subdomain of that domain. So instead of going to localhost/mysite I could go to test.mysite.com.
Tell me if I'm wrong, but I shouldn't have to upload any files to GoDaddy because I'm using MAMP as the server. Right?
Keep in mind, this isn't permanent. I'm not planning on hosting my site on my computer using MAMP. I'm just wandering if it's possible and how to do it if it is.
Any suggestions, comments, or answers are greatly appreciated.
Thanks.
- Ryan
MAMP is not the server. MAMP adds server capabilities to your computer, but you can't use MAMP to mimmic any server.
What I recommend you is working on your computer, with MAMP and using localhost as the "test address". After the page is finished in your localhost, and everything work fine, you can upload your page to your server (with FTP). This way you avoid having to upload your files via FTP every time you make a change in your code.
And welcome to the PHP World. Countless mugs of coffee and restless night await you.
You can create some folder on web server(on your paying hosting) and upload all files from your test localhost folder. Everyting would work perfectly if you type: https://yourwebsite.domain/yourfolder. If you want to set it to view like http://yourfolder.yourwebsite.domain you must from Control Panel set up an some subdomain. Subdomain is make something like this: you enter name of subdomain and folder which is mapped to that subdomain. For example, you set up subdoman http://test.web.com and map that to http://web.com/testfolder.
I hoppe that I help you.

is it possible to create a system that is connected a website with the same database

Good day. I have a thesis project. it is composed of a webpage created on php and a system using vb.net 2008.
As of now , they are both connected to the same database.
I am wondering if it is possible that if i packaged the system and live the website, will still be connected with one database? Thank you in advance.
If I understand you right (and the question could be better worded), you're asking what happens if you deploy the website on a different server than the one you used to develop it. The short answer is that, unless the machine hosting the database is accessible to the web server host machine, that you would also have to redeploy the database.
In other words, wherever you move the PHP-based website and VB.NET system, they would need to be able to access the machine hosting the database server. Otherwise, I see no issue with them both accessing the same database.

Categories