git clone and new permissions - wordpress

I have a repository on github with preset wordpress with a few plugins. I cloned it into my mamp folder to start working on a new project. However something is wrong with the file permissions. During WordPress installation wp could not create wp-config file, so I had to create it manually and when saving it requested an admin password to do so. If I want to update a plugin while in the admin area of this new wordpress site it requires ftp credentials, while if I go to another site in the same mamp folder I can click update and the plugin is updated. I checked the permissions for both wordpress site folders and they are 755. My question is what could trigger such behavior with permissions and how can it be prevented in the future?

Related

Moving backed up Wordpress from subdirectory to root

I have a question regarding moving a backup from http://websitename/subdirectory.com to http://websitename.com.
What is the best approach to do this?
I have the backup from the subdirectory on my pc and currently on the website root there is a clean Wordpress installation.
There are alot of pictures, the Avada theme there and other media files.
If I just copy the files via FTP will it crash or will the URLs be broken afterwards?
This will take a couple of steps to but here is the basic steps required.
Download the database from phpmyadmin (or however you access your sites database).
You should have a .sql file now.
You need to do a search and replace action on the full url for the site in the subfolder to the new location where it will live at the root. Your goal here is to get the subfolder out of every url on your site. Example, your current url is this: https://example.com/subfolder/ - you will need it to be https://example.com/
Save that version of your database as a new file called import.sql.
To be safe, I would create a new database, database user, and database password and import this new version into it. Store these values database name, database user, database password and database hostname. You will need them later.
Plugins
Download all of the plugins from /subfolder/wp-content/plugins/ folder and upload those to the /wp-content/plugins/ folder in your root level fresh install of wordpress.
Themes
Upload your theme to the /wp-content/themes/ folder from your /subfolder/wp-content/themes/ folder.
Uploads
Download everything in the /subfolder/wp-content/uploads/ folder and upload to the /wp-content/uploads/ folder.
Update your wp-config.php
That database that you created and imported your database in Step 1 here, you'll need to update your wp-config.php with the new database name, database user, database password and database host.
The last step here is to upload the wp-config.php to the root file and this will point the site to the new database.
Login to wp-admin
Login to wordpress at the root example.com/wp-admin/. Go to Permalinks settings and save them. Sometimes you have to do that to flush the permalinks and make subpages work.
Test your site
Go the frontend of your site and test everything to make sure that everything is in working order.

Hosted the website in godaddy. How to create wordpress web-site?

We have a domain hosted in godaddy. The web-site works fine without any issues.
Now we would like to use wordpress and wordpress themes and plugin to build the web-site
How do install or deploy wordpress in godaddy?
Thanks.
In godaddy, there is an option for one click install wordpress.
Or
If you want to install wordpress manually follow the below steps :
Download and unzip the WordPress package if you haven't already.
Create a database for WordPress on your web server, as well as a MySQL (or MariaDB) user who has all privileges for accessing and modifying it.
(Optional) Find and rename wp-config-sample.php to wp-config.php, then edit the file (see Editing wp-config.php) and add your database information.
Upload the WordPress files to the desired location on your web server:
Run the WordPress installation script by accessing the URL in a web browser. This should be the URL where you uploaded the WordPress files.
For more details see this link click here

WP not displaying the latest version update button for wordpress

Hello i am not getting the Update Now button at wordpress admin.
My current worpdress version is 4.8.3
so how can i solve upgrade my wordpress 4.8.3 to latest version 4.9
you can do one thing in wordpress folder i.e. you can do all plugins deactivated after you refresh the dashboard page from backend admin side then you can get the Update Button.
Otherwise you can upgrade the version by manually,
Follow the steps,
Upgrading WordPress Core Manually
First create a full backup of your website. This is very important
in case you make a mistake.
Download the newest WordPress ZIP file from wordpress.org.
Unzip the file into a directory on your local machine or in a separate directory on your website.
Deactivate all of the plugins on your WordPress site.
Go to your website root directory and delete your ‘wp-includes’ and ‘wp-admin’ directories. You can do this via sFTP or via SSH.
Upload (or copy over) the new wp-includes and wp-admin directories from the new version of WordPress you unzipped to your website root directory to replace the directories you just deleted.
Don’t delete your wp-content directory or any of the files in that directory. Copy over the files from the wp-content directory in the new version of WordPress to your existing wp-content directory. You will overwrite any existing files with the same name. All of your other files in wp-content will remain in place.
Copy all files from the root (‘/’) directory of the new version of WordPress that you unzipped into your website root directory (or the root directory of your WordPress installation). You will overwrite any existing files and new files will also be copied across. Your wp-config.php file will not be affected because WordPress is never distributed with a wp-config.php file.
Examine the wp-config-sample.php which is distributed with WordPress to see if any new settings have been added that you may want to use or modify.
If you are upgrading manually after a failed auto-update, remove the .maintenance file from your WordPress root directory. This will remove the ‘failed update’ message from your site.
Visit your main WordPress admin page at /wp-admin/ where you may be asked to sign-in again. You may also have to upgrade your database and will be prompted if this is needed. If you can’t sign-in, try clearing your cookies.
Re-enable your plugins which you disabled earlier.
Clear your browser cache to ensure you can see all changes. If you are using a front-end cache like ‘varnish’ you should also clear that to ensure that your customers can see the newest changes on your site.
Your upgrade is now complete and you should be running the newest version of WordPress.
Hopefully, you get the solution.

Upgrading to WooCommerce 3.1 not available?

My website is using WooCommerce 2.6.14, so I thought I should update to WooCommerce 3.1. The weird thing is that I don't see "Update now" button in the Plugins admin page:
Plugins page
And I can't manually update WooCommerce by overwriting the folder in FTP because it's not visible!
FTP
Any idea how can I update WooCommerce?
First back-up your WordPress site if you haven’t already.
Download a ZIP file of the plugin you need to upgrade.
Use FTP to delete the existing plugin directory from the wp-content/plugins/ directory on your site.
Replace the deleted directory by uploading the unzipped plugin to the wp-content/plugins/ directory leaving it in a directory that looks like (for example) wp-content/plugins/plugin-name
5.Sign in to your WordPress site. Go to the ‘Plugins’ menu and verify that the plugin you upgraded is the newest version.

wordpress asks for ftp password while installing plugins

I have a centos with user anamika with ftp loging.
I create wordpress folder loging with user anamika in webroot directory. User anamika has apache as primary group. The create folder gets user of anmika:apache when create.
When I try to install plugin it asks for ftp login.
When I changes user from anamika:apache to apache:anamika it works fine.
Please suggest a way to solve this user issue.
I checked following suggestion and wordpress blogs but didn't worked.
Wordpress plugins it asks for FTP Details
Wordpress asking for my FTP credentials to install plugins
Installing plugin for wordpress website hosted locally is asking for ftp details
If WordPress asking hostname and connection details for installing plugin and themes, we need to add a function hook in the wp-config.php file in the home directory.
define('FS_METHOD','direct');
You can use Paste the following code to your wp-config.php file,
preferably just below every other line of code to install plugin without ftp details...
define('FS_METHOD','direct');
The issue was with the permission of the user apache. I changed the user and group of the apache in httpd.conf file to the ftp user and it solved the issue.
Changed User apache Group apache to User anamika Group anamika

Resources