Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with permalinks #66

Closed
AndreaBarghigiani opened this issue Nov 28, 2013 · 6 comments
Closed

Problem with permalinks #66

AndreaBarghigiani opened this issue Nov 28, 2013 · 6 comments

Comments

@AndreaBarghigiani
Copy link

Hi weilaka team,

congrats for your amazing work! I've been usign your gem in the last few days and I've been impressed with its easy of use.

Unfortunatly there is a little problem that I can't understand properly, but I'm sure its my fault ;) Every time I pull or push my work the platform that has been updated it will loose the permalink settings and I have to enter in the admin panel and save again the permalink structure (just to flush the rewriting rules).

There is something wrong with my Movefile? Should I add the .htaccess file in the exclude section?

Thanks in advance for your help!

@Arkham
Copy link
Contributor

Arkham commented Nov 28, 2013

Hey there! Can you please paste an example of your Movefile? Moreover, are you using wordmove push --all by chance?

@AndreaBarghigiani
Copy link
Author

Sure:

local:
  vhost: "http://localhost:8888/trueIdeaMus/"
  wordpress_path: "/Volumes/Sviluppo/www/trueIdeaMus" # use an absolute path here

  database:
    name: "trueIM"
    user: "root"
    password: "root"
    host: "localhost"

staging:
  vhost: "changedbyme"
  wordpress_path: "/home/changedbyme/public_html" # use an absolute path here

  database:
    name: "changedbyme"
    user: "changedbyme"
    password: "changedbyme"
    host: "localhost"

  exclude:
    - ".git/"
    - ".gitignore"
    - ".sass-cache/"
    - "bin/"
    - "tmp/*"
    - "Gemfile*"
    - "Movefile"
    - "wp-config.php"
    - "wp-content/*.sql"
    - "trueIdeaMus.sublime-project"
    - "trueIdeaMus.sublime-workspace"
  ssh:
    user: changedbyme
    password: changedbyme
    host: changedbyme

Actually, from time to time, I need to run a wordmove push --all because maybe I am working on some plugin configuration or I have to add/remove posts or pages to test some things out. I use the same permalink structure on both systems and I thought I could be fine with it, but maybe it's not the right way of thinking...

Thanks for the help!

PS: where you read changedbyme means that I have edited the information for security reasons ;)

@Arkham
Copy link
Contributor

Arkham commented Nov 28, 2013

The fact is that --all updates the core wordpress installation too, so I guess it may be that command to overwrite your htaccess, you should try adding that file to your ignore list too!

Morever, another thing to take into consideration is that ssh is using rsync --delete to keep you local and remote installations in sync, so all the files on your remote installation which aren't in your local installation get deleted on the remote host.

I'll ask for more opinions from @pioneerskies here :)

@alessandro-fazzi
Copy link
Member

I would exclude htaccess all the way. Its configuration is

  • managed by wordpress backoffice (most of the time)
  • almost environment dependent

so I can't see a real need in order to move it back and forth dev and production.

Overall I'd like to advice you to use --all and/or -w flags as few times as possible; by theory they are needed just after a WordPress core update. In all other common use case -tpd is the way to go (themes, plugins, database).

Let us know if such approach works for you

@AndreaBarghigiani
Copy link
Author

I'll keep that in mind, thanks!

@kevinwhoffman
Copy link

I just ran into this problem and wanted to confirm that excluding .htaccess in my Movefile resolved the issue of having to manually refresh permalinks. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants