XAMPP wordpress on localhost - wordpress

I have this site and I need to test it out locally to see if there is an issue with my php settings, anyways I tried to navigate to localhost with the port number localhost:portnumber
and that worked fine, but then I tried to navigate to my site localhost:portnumber/mysite and I get a 404 error and the in the the address i navigate to changes to localhost:portnumber/mysite
Why is this happening and what can I do to fix it?
Thanks

Because you are getting a 404 error, your server seems to be running but make sure the server is the one you have setup.
1st, have you tried using a simple html file? example: blabla.html on root, and typing: localhost:portnumber/blabla.html
If this is working, that means your server is running fine, you can also try with an Hello world php file if you wish.
In the case of wordpress, there is sometime a .htaccess file that uses url rewrite and it may remove your port number, you could try to test with a clean wordpress install first.

Related

index.php is bypassed in wordpress local install

hello I have a local wordpress installation, which is a copy of my hosted website.
i'm going to try to make it simple :
If i type "http://mylocalwebsite/index.php", it works and shows me my local copy
If i type "http://mylocalwebsite", index.php is still used, but i'm ending in my hosted web page (www.myrealsite.com)
If i type "http://mylocalwebsite" again, it doesn't use index.php, and directly opens my hosted website.
All hosts files are correct, none of them is leading to my hosted website.
I've done a search for "www.myrealwebsite.com" in the directories of the local copy : no result.
I just don't understand why. Any ideas ?
Thx
This is a cached redirect from the browser you are using (since the hostname you are using is not FQDN, the browser tries to correct that, or has previously seen a (301) redirect to the real webpage like from non-www hostname, to a www.hostname and uses that to assume what is correct).
If you try the same with CLI curl request, I would imagine the result will be as you expect.

Coresphere console bundle 301 error

I'm trying to deploy a symfony project, but something is wrong with the console (I'm on a shared hosting).
It worked just fine on localhost, but on the server, it seems to be looping, which I'm having trouble debugging, since I'm not really sure why this is happening..
Edit : Prior to uploading, I changed my DB parameters, renamed the web folder according to the name used by my host, allowed my IP in app_dev, and made sure everything worked fine under app.php on localhost. Once uploaded, config.php did not have any recommendations.
Can anyone please help?
Thanks
Here's a screenshot of firebug when I try to run the console

PhpStorm + WordPress Project + "502 Bad Gateway error"

I have used WordPress on Cloud9 successfully previously, but I can't even get a new one to start via JetBrains IDE.
I have two machines: one Windows (XAMPP) and one Mac (MAMP) and getting the same "502 Bad Gateway" error when the browser tries to login to the WordPress dashboard page.
I downloaded a fresh WordPress copy, set up my database and ran index.php in the WordPress root folder. That does take me through the database questionary and up to the WordPress login page, and then the browser hangs there. It tries to load something and nothing happens. If I halt the browser and refresh, I'll get the 502 error and I'll keep getting this error on ANY OTHER files that I try to run from now on (it feels like something server-related breaks from within the IDE and I have to restart it).
The PHP 7 interpreter seems to be working fine, because I don't have an issue running any other of my non-WordPress projects.
The project address is http://localhost:63342/wordpress/, but I noticed this below link is shown in the PHP-CGI server window:
/Applications/MAMP/bin/php/php7.0.0/bin/php-cgi -e -b 127.0.0.1:56502
Does this PHP CGI pointing to a different port number mean anything? I am new to WordPress and it was a breeze starting one in Cloud9, but I just don't understand why it doesn't work in PhpStorm 10.
As I said, there is the same problem on two machines (Windows, Mac, MAMP, XAMMP, and PhpStorm), so I know it is me who's missing something here.
I recommend you use Varying Vagrant Vagrants WordPress (VVV).
It's a better solution and will help you achieve better results without too much hassle.
I would recommend you to use a simple editor like Sublime Text or Atom and install packages. I have personally lost many hours trying to get PhpStorm, MAMP, LAMP, and XAMPP work the way they should.
I managed to solve my problem. It was the port number causing it to crash. My MAMP port number is 8888 (XAMPP is 80) and when I set up PhpStorm a year ago on both machines somehow I entered 63342 as server port number!
This never created any problem for me whatsoever running dozens of PHP projects since then, but obviously, it mattered to WordPress (dashboard). I went to PhpStorm settings and corrected the port number so it matches MAMP/XAMPP and all is working fine now.
It was a pretty basic (and silly) mistake to make on my part, but that wasted two full days in which I could have been teaching myself WordPress and developing themes/plugins.
Yes, it worked for me after configuring the built-in server port to 80 (I have used XAMPP)
Setting steps in phpstrom: Configure the built-in web server

Troubling with wordbress nginx on ubuntu

I installed nginx, php5, and wordpress on ubuntu 12.04 (as well as other services).
I followed step by step digitalocean's tutorial, somewhere in the middle of the process i realised i want to switch from root user to 'foo' user and i chown-ed all relevant files and directories.
I finished the tutorials and straggling for many hours trying to figure why i get 403 forbidden error.
i launch the service with foo user using sudo.
all the workers are running under foo apart from the master which is running from root.
Update:
It seems i have a problem with the landing page which doesn't recognise it should look for index.php, when i type xxx.xxx.xxx.xxx/index.php (as full path to the php file) i get this error:
The page you are looking for is temporarily unavailable.
Please try again later.
This error pops only on php files, on regular html / txt it works fine.
any suggestions why:
default landing is not directed to index.php
can not open php files
Update:
So apparently the tutorial in digitalocean had a minor misleading line, i solved the 2nd problem with this nice article: http://www.queryadmin.com/921/connect-unix-var-run-php5-fpm-sock-failed/
for some reason a few lines in the vhost file were commented out. rest of issues were solved as described above updates

Drupal migration - now only front page works

I just migrated a Drupal site from a ISP
to a dedicated Linux CentOS server.
MySQL Database is configured and generates front page without error.
Problem is that only the home page works.
All other pages show "404 Page Not Found Error".
So mysite.com/ works
but mySite.com/node/1 does not work.
I checked some obvious places:
LoadModule rewrite_module modules/mod_rewrite.so
is enabled in httpd.conf
Any ideas?
I've had this happen before. It could be because your new Linux Centos OS server isn't configured for clean URLs yet.
Try to access the site as follows. To login:
http://example.com/?q=user/login
Login as admin and submit the form. You'll get access denied 404 page again after submission but still login.
Now manually type and go to http://example.com/?q=admin/settings/clean-urls
On this page turn off clean-urls and save and you should be able to access your site normally on the new server. Just configure it for clean-urls and then turn it back on when it's ready.
thanks Kevin,
mysite.com/?q=node/1? gives me a 404.
.htaccess was indeed missing. I copied in a generic version from a
vanilla install into root directory (same directory as index.html) and this does not help.
(I don't have access to old site. We did not modify .htaccess - so I assume vanilla copy will do)
Another possibility: If it's a new server, make sure that Apache has mod_rewrite installed. Happened to me.
If you have drupal 7 or higher use this for the clean-url config page:
mysite.com/?q=admin/config/search/clean-urls
Check to see that the .htaccess file made it through the migration. Usually the culprit here. Can you get to mysite.com/?q=node/1?

Resources