Permalinks showing index.php

Hello,

Why pages URLs look like this https://SITE-NAME.dev/index.php/PAGE-NAME/ ?

If I use migration tools will all url be exported with “index.php” inside url?

thanks

Hi Karen,

Right now I don’t have a good answer for why this is happening. We’re still looking for patterns.

Fortunately, it’s super easy to fix. Simply go to Settings » Permalinks in the WordPress admin and re-save and it should fix the issue :slight_smile:

I did re-saved but it didn’t help. any ideas what to do?

You may need to click off and back onto the “Post name” option. After doing that, you should see /%postname%/ in the “Custom Structure” input.

I have three sites in Local, everything fine. On the third one though, permalinks show the “index.php” part. I can choose %postname% in the permalink settings, but the other options still show index.php anyway. On Apache this happens when .htaccess is not properly configured, but I’m using the preferred settings, so nginx it is.

The three sites are almost identical in setup. Only difference is, for the first and second sites, I imported them from other Wordpress installs (files and database, not from Local).

Not a huge problem, but would like to know how could I control this?

Thanks!

Hi @luissantander,

Heads up! I merged your post into this thread :smiley:

Can you please provide a screenshot of your Permalinks options panel in WP?

Here is a video https://drive.google.com/file/d/0BzNhsKvFW-OHVXo5R1M4UmFsSzQ/view?usp=sharing

My question was if I migrate to the real hosting will I have index.php in my URL?

Thanks for the video! If you use the Custom structure and delete index.php from it, what happens?


Initially, after you push it, I’m not sure. But I would guess you can adjust it shortly thereafter.

Clay, can you please tell me what’s the point to produce and push not ready product?

@termoplus,

Is the site running the Preferred or Custom environment in Local?

Also, have you tried restarting the site?

Yes. I restarted the site, soft, computer…
Regarding Preferred or Custom environment I do not understand you. I installed it and started to use.

thanks

Sure! Here’s what I mean:

This happens with all my new sites it seems.

@termoplus @luissantander,

Can one of you please create a new site in Local to try to reproduce this issue?

If it reproduces, I would greatly appreciate it if you could export the site (right-click on it in the sidebar and go to “Export”) and then send me the zip. :smiley:

Ok, I just created this one: https://we.tl/RnlwYp20fO

The workaround works for sure (leaving just “%postname%”), posts and pages work fine, but it’s still weird.

I can create a new site on Local, delete the database and import a database from a different (non Local) install and it doesn’t get the ‘index.php’ segment in the urls.

Thanks for the help!

Just thought I’d chime in here and mention I’m seeing the exact same issues that were brought up already in this thread. index.php is showing up in the permalinks of the site I just created. I’ve got 9 others in Local and I’ve never seen this before. I’m using the preferred set up with nginx. Looking forward to some kind of solution. Thanks!

Hello, I too am experiencing this: all my permalinks include “index.php” in them. I am running Local version 2.1.2. I followed the suggestion of restarting my sites and going to “Settings > Permalinks” to resave, but this did not result in “index.php” being removed from permalinks. Hoping someone will chime in on this thread with another possible solution. Thanks!

Hi all,

This issue should be resolved for any new sites you created.

If you’re seeing this issue on existing sites, please add the following snippet to your wp-config.php file.

/* Inserted by Local by Flywheel. Fixes $is_nginx global for rewrites. */
if (strpos($_SERVER['SERVER_SOFTWARE'], 'Flywheel/') !== false) {
	$_SERVER['SERVER_SOFTWARE'] = 'nginx/1.10.1';
}

The next version of the Preferred environment will not change the SERVER_SOFTWARE param in the nginx config file.

Clay, thanks for following up. I added the snippet to the end of my wp-config.php file, saved the file, visited ‘Settings > Permalinks’ (refreshed the page, clicked ‘Save Changes’) and even restarted my site in the Local admin and unfortunately ‘index.php’ is still there. You can see what my Permalinks page looks like in the attached screenshot.

Anyone else who’s following this thread have success using this snippet?

@clayteller,

Is that site running the Custom or Preferred environment?

Preferred 1.1