I have a working wordpress site online, running on an Ubuntu 16.04 VPS. I've typically just edited the files via FTP, but I'm trying to get more organized. I'm setting up a development machine with VirtualBox running Ubuntu 16.04 (with Windows as the host OS) so I can experiment. I'm having trouble getting wordpress to load.
I've copied the website files into the VM. I have PHP 7.0.12 installed in the VM. I have the database copied over and it's running fine in the VM. I start the PHP server with
cd /path/to/website/public
php -S 0.0.0.0:8080
When I visit localhost:8080 from Chrome in Windows, I get a Page not found error in chrome. However, I create a public/info.php file with <?php phpinfo(); ?>, and then visit localhost:8080/info.php, I get the correct PHP info page.
I also tried configuring Nginx inside the VM like I have it on the real server. I get the exact same results as with the built in PHP server.
When I visit localhost:8080/wp-admin, I get redirected to the admin page of the live server.
Any idea on what I'm missing or how I might go about debugging the issue?
When move WordPress to another domain, Instead of directly copying Database, we have to use Database migration plugins or manually updating content on DB.
https://wordpress.org/plugins/wp-migrate-db/
https://codex.wordpress.org/Moving_WordPress#Changing_Your_Domain_Name_and_URLs
Then use this updated DB and copied files. That will solve your issue.
Related
XAMPP has some error about ports I uninstall it but did not back up any information and now my project does not run on local host is there any way for me to restore my old project or I have to do it again on new XAMPP? another problem is after reinstalling XAMPP windows do not know PHP what should I do?
by the way I am a very beginner in this :)))
So, I will try to explain this:
Websites (i.e. with PHP) need a webserver. For example when you go to stackoverflow.com, you automatically call a webserver who then compiles the PHP scripts on the server to HTML code.
This principe does also apply to your local installation.
When you call localhost, you basically call yourself as the webserver. XAMPP is a tool that can "simulate" a webserver on your PC, thats why PHP sites do not work without it, because your browser doesn't know what to do with PHP code, it only understands HTML.
If you install XAMPP again you should be able to get it running.
If you have any questions/problems with the XAMPP installation, feel free to ask again.
On the Ubuntu server the database, web, and php seem to be working correctly.
I copied my php application from Windows 10 XAMPP environment to my Ubuntu into the correct directories.
Using the Firefox on another Ubuntu it brings up the first page correctly, but when it jumps to the next php code application I get a 404 can not find file.
I can manually get the page without problem. I must be missing something very simple. So can you help?
I'm not a Ubuntu guru, still learn all the ins and outs.
HI I am trying to configure IIS7 to run PHP on a windows 2008 server machine.
I have followed this guide, php running on IIS7
Everything went well and I am sure it was working!!
However now when I try and run phpinfo.php the browser wants to download the page rather than running the script.
The handler mapper is configured the same as the the example. fastCGI/CGI is installed and enabled.
a normal index.html open no problem.
I have checked permissions, created a new empty site apart from phpinfo.php
I developed the site on my pc in a xampp environment where everything work great. First time I have tried to convert a site from xampp to IIS.
Their is no entry in the MIME Types, I am wondering if the WEB.CONFIG file is the issue but I don't know enough about what the file should/shouldn't contain.
thanks for any help
you can use http://php.iis.net/ to install php into your IIS setup. It comes with a manager to help you easily implement php in to your iis server and is way easier then trying to configure it manually. Hope this helps.
I installed Apache onto my C: drive. (C:/Apache).
I then installed phpmyadmin and placed it inside a folder (htdocs) inside C:/Apache.
I followed a youtube installation example for Apache. When it asked me my domain name and server, I copied what the tutorial said to put, which was "localhost" for both fields.
After both Apache and phpmyadmin had been installed and set up, I tried accessing phpmyadmin, but all I got was a lot of code.
I am wondering, if, when I was installing Apache, if, I should have typed bravehost.com or my bravehost server name, instead of localhost.
When I try to access the Phpmyadmin login page (index.php), I only get a page full of code instead of the login page.
How can i do this ?
PhpMyAdmin will only work if you have PHP installed and linked to Apache as a recognized plugin by editing the httpd.conf file within Apache. If you have not done this, the browser has no way of knowing how to parse the PHP code. I advise directly downloading and using a WAMP Stack (like Zend, XAMPP or WAMPServer) which would have PHP, Apache, MySQL and phpmyadmin pre-configured. Would be easy for you to begin with.
Install php
Enable php and check through phpinfo()
Isntall mysql
Install phpmyadmin
After installation by default pma url is localhost/phpmyadmin (or what eve you setuped while installation). Remember that pma is only php scripts (it's not soft as apache\mysql\php).
If you see php code on pages it means that php is not working and apache give you 'raw' code. Re-check that your php is enabled and is working.
Okay so a few days ago I had my localhost running off of Wamp to where the files I was working on were connected to my server (through bitbucket to where I can use git in aptana) and everything was working fine (whatever displayed on my localhost off of Wamp server displayed on my bluehost server of course when everything was up to date).
I had to re-install Wamp and I cloned my project again from bitbuckit into my www directory (through aptana) to where my localhost would be connected to my server again and also imported the database to where the setup should be exactly as on the server.
This time when I go to my localhost on my computer to display the components/webpages it doesn't display everything. It only displays the background of my pages and components being used on all across the entire site.
Since everything on the localhost is exactly the same as server (code and database) it should display like it does on the server.
What could be causing this?
Are there configurations in Wamp that could be causing components to not display?
I have re-installed Wamp multiple times as well as trying this on Xampp and the same thing is happening.
Any help will be much appreciated!
So it turns out that the Wamp/Xampp version I was installing (which were the new versions) had php versions which wasn't compatible with the php version that is off of bluehost server (which is currently at 5.2.17).
So I installed Xampp version 1.7.1 (which supports php version 5.2.8).
And now my local is working exactly as my server...EVERYTHING is displaying as it should!