Forum Replies Created

Viewing 15 replies - 1 through 15 (of 40 total)
  • Thread Starter rozard

    (@rozard)

    Finally, I was able to make it work. I made two changes, and that fixed the issue. I added FS_METHOD line, and secondly, I removed “dirname(FILE)” part from the wp_content_dir code. I am not sure if it was added as an example or if it was part of the code. I just wanted to post the solution, just in case a newbie like me will have a similar issue in the future. They just need to add two lines below.

    define('FS_METHOD', 'direct');
    define('WP_CONTENT_DIR', '/mnt/wp-content');

    Thank you, @bcworkz, for your help!

    Thread Starter rozard

    (@rozard)

    Theme exists in the directory, but when I go to the admin panel from the web UI, there isn’t a theme. It looks like it’s not reading the new location. I tried with /var by copying the wp-content directory into it, but I got the same error message. I disabled SELinux and changed permission to 755 for all of the directories and subdirectories. Not sure what I am doing wrong. Is there any way to enable WordPress logs? I don’t see any error from Apache logs. Thanks

    Thread Starter rozard

    (@rozard)

    The database part works fine; I use the same table prefix for both instances. Now, I am trying to move the entire wp-content directory to a mount point and then mount the mount point to /mnt with both servers instead of moving plugins and uploads. However, when I tried that, I got the below error when I try to access the website. Permission looks fine; all files are owned by Apache, the Apache user and group have all permission, and others have read and execute permission. Selinux label also got copied but I still ran restorecon to relabeled it. Theme can’t be moved?
    The theme directory "themeName" does not exist.
    Error:?The themes directory is either empty or does not exist. Please check your installation.

    Thank you for your help!

    Thread Starter rozard

    (@rozard)

    I want to share all the tables from the same database with both websites. The goal is to add both websites in a load balancer and make it highly available. If one goes down the second one will be still serving with same contents.

    I have another question about changing the WordPress content directory. I went through the link you provided, copied the below line, added it to the wp-config.php file, moved the WordPress content directory to /mnt, and started Apache. It didn’t show anything; it was just a blank page with no content and no error. Then, I reverted the change and copied the line which is for the plugin to the config file, started the Apache, and the website came up. The plugin installed page was empty and there were error messages for each plugin, such as “The plugin?somePlugins.php?has been deactivated due to an error: Plugin file does not exist.”

    define( 'WP_CONTENT_DIR', dirname(__FILE__) . '/mnt/wp-content' );

    I am not sure I need to make other configuration changes. I didn’t find anything else in the article about making any other changes to make it work. I might have missed it. I appreciate your help!

    Thread Starter rozard

    (@rozard)

    Thank you for your response. I added WP_HOME and WP_SITEURL entries and changed the table_prefix value from wp_ to node2_ from the wp-config.php file and started Apache. However, I am getting an”Already Installed” message. The screenshot is uploaded to this filebin link. https://filebin.net/otzl9khkdj6ekkbo

    Do you have any idea how I can fix this? I appreciate your help!

    • This reply was modified 2 months, 3 weeks ago by rozard.
    Thread Starter rozard

    (@rozard)

    Hell @threadi the wordpress.conf file is /etc/httpd/conf.d/. I will try to check with the Red Hat community; tbh, they’re not responsive. I asked an OS-related question months ago but never got a response. Thanks,

    Thread Starter rozard

    (@rozard)

    Thank you, I was able to install it and make it work. However, I still needed help finding what I was looking for. There is an existing bash script that I’m trying to modify. It says to replace checksum with my WordPress version. 32 characters long alphanumeric code. I am still trying to figure out how to find it. Does anybody have an idea how I can find this peace of code?

    # Scan WordPress core files for changes
    core_files_checksum=$(find "$WORDPRESS_DIR" -type f -name "*.php" -exec md5sum {} + | sort -k 2 | md5sum)
    baseline_checksum="3c87070bfb0aa06649f76a3e3a0c2828" # Replace with checksum of your WordPress version
    if [ "$core_files_checksum" != "$baseline_checksum" ]; then
        core_files_modified=1
    fi
    Thread Starter rozard

    (@rozard)

    Thank you all for trying to help me. I fixed the issue. It was related to SELinux. For some reason, I didn’t think about the SELinux context earlier. It was the first time I installed WordPress on Linux. I’m still looking around and figuring out how things work with Linux. Since I installed WordPress, I have encountered two issues, which I fixed. This was the second one. Now, I have a question about checksum, which I need help to figure out, but I’ll create a separate post about it. Here is the command I ran that fixed the issue. It may help someone else if they have a similar issue.

    # chcon -R -t httpd_sys_rw_content_t /var/www/html/wordpress
    Thread Starter rozard

    (@rozard)

    I found the issue. I will post the fix that can help someone. sebool was causing the issue. httpd_can_network_connect and httpd_can_network_connect_db were off and I set it on and it worked.

    Thread Starter rozard

    (@rozard)

    The only additional thing found in the article was port. I added the port to the wp-config.ph file, such as 192.168.0.212:3306, in the host section and restarted httpd, but it didn’t make any difference.

    Thread Starter rozard

    (@rozard)

    I installed another WordPress by using same database with different table prefix. Now I have same users in both websites. But the problem is I have to install plugin in both website. Is there anyway to share the plugins? I mean if the plugins are already installed in my actual website.com and I can share to my website.com/english?

    Thread Starter rozard

    (@rozard)

    These plugin won’t work because my language is not available in the list. It is also not in google translate list. I’m wondering is there any other way to accomplish that.

    Thread Starter rozard

    (@rozard)

    The plugin didn’t help, it is just showing how may % the plugin using which one plugin is using 13% and rest less than 10%.
    The problem is that Physical Memory Usage is 10%, 5 minutes later it becomes 100% used, same is I/O Usage and CPU usage. I don’t have any idea why it fluctuating like that, I contacted godaddy, they are just trying to sale their services, sometime they said, oh yeah because it is http, you should buy ssl, sometime they said I have to buy more resources and sometime they offer professional services for optimizing. Finally someone said I have to contact wordpress that why is happening. It is really frustrating..

    • This reply was modified 4 years, 6 months ago by rozard.
    Thread Starter rozard

    (@rozard)

    I uninstalled a plugin and it resolved. Thank you so much

    Thread Starter rozard

    (@rozard)

    I removed the short code from listing page, now don’t see the duplicate posting there, but unfortunately the categories are still not working.

    https://prnt.sc/sfsxba
    https://prnt.sc/sfsyyi

Viewing 15 replies - 1 through 15 (of 40 total)