• Resolved bobhaha

    (@bobhaha)


    Hi Guys and Gals,

    I have an issue, and for the life of me I can’t figure out why this is happening.

    I use a cloud based server (Cloudatcost) running CentOS 7. I have installed nginx, php-fpm and have configured them correctly… as far as I know.

    WordPress was installed via wget http://www.wordpress.org/latest.zip into /usr/share/nginx/html

    I setup my db as root for username and no password. I’m using mariadb as the mysql stand in.

    I will now paste in my config files.

    wp-config.php

    <?php
    /**
     * The base configuration for WordPress
     *
     * The wp-config.php creation script uses this file during the
     * installation. You don't have to use the web site, you can
     * copy this file to "wp-config.php" and fill in the values.
     *
     * This file contains the following configurations:
     *
     * * MySQL settings
     * * Secret keys
     * * Database table prefix
     * * ABSPATH
     *
     * @link https://codex.wordpress.org/Editing_wp-config.php
     *
     * @package WordPress
     */
    
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'wordpress');
    
    /** MySQL database username */
    define('DB_USER', 'root');
    
    /** MySQL database password */
    define('DB_PASSWORD', '');
    
    /** MySQL hostname */
    define('DB_HOST', 'localhost');
    
    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8mb4');
    
    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');
    
    /**#@+
     * Authentication Unique Keys and Salts.
     *
     * Change these to different unique phrases!
     * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key $
     * You can change these at any point in time to invalidate all existing cookies. This will force all users to have $
     *
     * @since 2.6.0
     */
    < define all keys >
    < shh this is secret >
    /**#@-*/
    
    /**
     * WordPress Database Table prefix.
     *
     * You can have multiple installations in one database if you give each
     * a unique prefix. Only numbers, letters, and underscores please!
    $table_prefix  = 'wp_';
    
    /**
     * For developers: WordPress debugging mode.
     *
     * Change this to true to enable the display of notices during development.
     * It is strongly recommended that plugin and theme developers use WP_DEBUG
     * in their development environments.
     *
     * For information on other constants that can be used for debugging,
     * visit the Codex.
     *
     * @link https://codex.wordpress.org/Debugging_in_WordPress
     */
    define('WP_DEBUG', false);
    
    /* That's all, stop editing! Happy blogging. */
    
    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
            define('ABSPATH', dirname(__FILE__) . '/');
    
    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');

    http://www.conf

    All I have done for this is changed user and group to nginx

    default.conf

    server {
        listen       80;
        server_name  localhost;
    
        #charset koi8-r;
        #access_log  /var/log/nginx/log/host.access.log  main;
    
            root   /usr/share/nginx/html;
            index  index.html index.htm index.php;
    
        location / {
            try_files $uri $uri/ /index.php$is_args$args;
        }
    
        #error_page  404              /404.html;
    
        # redirect server error pages to the static page /50x.html
        #
        #error_page   500 502 503 504  /50x.html;
        #location = /50x.html {
        #    root   /usr/share/nginx/html;
        #}
    
        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}
    
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $request_filename;
            include        fastcgi_params;
        }
    
        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
    }

    Permissions are below…

    -rw-r--r--.  1 nginx nginx   418 Sep 24  2013 index.php
    -rw-r--r--.  1 nginx nginx 19930 Jan  1  2015 license.txt
    -rw-r--r--.  1 nginx nginx  7358 Apr 23 14:00 readme.html
    -rw-r--r--.  1 nginx nginx  4951 Aug 20  2014 wp-activate.php
    drwxr-xr-x.  9 nginx nginx  4096 Aug 18 14:13 wp-admin
    -rw-r--r--.  1 nginx nginx   271 Jan  8  2012 wp-blog-header.php
    -rw-r--r--.  1 nginx nginx  5007 Jan  8  2015 wp-comments-post.php
    -rw-r--r--.  1 nginx nginx  3034 Aug 28 08:47 wp-config.php
    -rw-r--r--.  1 nginx nginx  2764 May  9 20:06 wp-config-sample.php
    drwxr-xr-x.  4 nginx nginx    49 Aug 18 14:13 wp-content
    -rw-r--r--.  1 nginx nginx  3286 May 24 13:26 wp-cron.php
    drwxr-xr-x. 12 nginx nginx  4096 Aug 18 14:13 wp-includes
    -rw-r--r--.  1 nginx nginx  2380 Oct 24  2013 wp-links-opml.php
    -rw-r--r--.  1 nginx nginx  3123 Apr 12 17:29 wp-load.php
    -rw-r--r--.  1 nginx nginx 34669 Jul 28 23:56 wp-login.php
    -rw-r--r--.  1 nginx nginx  8252 Jul 17  2014 wp-mail.php
    -rw-r--r--.  1 nginx nginx 11062 Jun 24 22:29 wp-settings.php
    -rw-r--r--.  1 nginx nginx 25124 Jun 26 21:03 wp-signup.php
    -rw-r--r--.  1 nginx nginx  4035 Nov 30  2014 wp-trackback.php
    -rw-r--r--.  1 nginx nginx  3055 Jul 28 08:17 xmlrpc.php

    Everytime I try to update/install a plugin, theme or media, it says I don’t have write permissions and asks for my FTP credentials (which don’t work anyway).

    I have literally followed this tutorial perfectly! https://www.youtube.com/watch?v=C_6jxrCA1P8

    No good, at step 2 of the install process it says can not create wp-config, do it manually (which I did).

    Can you think of anything I’m missing?

Viewing 1 replies (of 1 total)
  • Thread Starter bobhaha

    (@bobhaha)

    Well I worked it out on my own… Hope this helps someone else..

    The issue was Selinux… it was just making horrible issues for me.

    The way I fixed it is by editing the /etc/sysconfig/selinux file and changing

    SELINUX=enforcing

    to

    SELINUX=permissive

    After you set this to permissive, remember to restart your server

    This will allow SELinux to print warnings instead of enforcing them.

    Now I’m up and running!

Viewing 1 replies (of 1 total)
  • The topic ‘WordPress, Nginx, CentOS 7, PHP-FPM – No autoupdate!’ is closed to new replies.