• Hi there,

    i self-hosted wordpress 4.0 in amazon ec2 with nginx.
    I can login to my wp-admin without any problem. However, everytime i want to customize any theme, the site will show a panel on the left and “session expired” with form on the right of the page. Everytime i login, it says login successful after which it says session expired again.

    I have been reading and browsing for solution for sometime and can’t find an answer.

    1) site-url and wordpress address must be the same. Did this but does not solve it. If i set site-url without www and wordpress address with www, it shows the panel but the right side is just empty
    2) disable all plugins. Did this but does not solve the problem
    3) Change to default theme to eliminate theme-specific issues. I switched to twenty-fourteen theme and tried to customize. Does not solve the problem.
    4) removed .htaccess did not solve the problem.

    Please help

Viewing 4 replies - 1 through 4 (of 4 total)
  • That usually happens when you don’t have the right permissions to write on the /temp directory. Did you give the ownership of the directory to the nginx user? If not, you need to switch to the directory where the wordpress installation is located and give the proper ownership
    Something like below (assuming the files are located inside var/www)

    cd var/www 
    
    sudo chown www-data:www-data * -R
    sudo usermod -a -G www-data username

    Be very careful with the permissions. If you change the permissions of a root directory like “var”, you will lose everything and will need to create a new instance.

    You may also check your php.ini file and see where the sessions are set to be saved. PHP may be trying to save it in a directory rather than /temp

    I hate the lemp stack and after having so many problems configuring nginx, I gave up and now I only use LAMP. Its easier and you will find more resources online.

    Good luck!

    Thread Starter trippleface

    (@trippleface)

    @harrison:

    Thanks for your suggestion.
    The wordpress folder is located at /var/www/www.example.com/public_html.
    i have sudo chown www-data:www-data -R public_html folder.

    so i did php -i |grep session and the session.save_path is set to /var/lib/php5.

    Do i need to chown that folder?

    Thread Starter trippleface

    (@trippleface)

    Is it because of my varnish?

    I do think you have to chmod that folder so the sessions can be stored by the user/wordpress.

    Take a look at these articles, it may help you a bit more.

    stackoverflow.com/questions/9203320/php-fpm-and-nginx-session-problems

    wpquestions.com/question/showChrono/id/7914

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Session Expired, Please Login infinte Loop’ is closed to new replies.